class table inheritance and loopback models..

63 views
Skip to first unread message

Aubrey

unread,
Oct 5, 2015, 3:13:48 PM10/5/15
to LoopbackJS
hi, i am trying to get a class table inheritance data model to work in loopback.. without migrating data. I have a problem that when a model extends another model the query does not join the other table.. is this even possible? (looking at the sql connector source it seems it is not...) ?

Raymond Feng

unread,
Oct 5, 2015, 3:57:46 PM10/5/15
to loopb...@googlegroups.com
What are your tables and their relations?

Sent from my iPhone 6 Plus

On Oct 5, 2015, at 12:13 PM, Aubrey <aubrey...@gmail.com> wrote:

hi, i am trying to get a class table inheritance data model to work in loopback.. without migrating data. I have a problem that when a model extends another model the query does not join the other table.. is this even possible? (looking at the sql connector source it seems it is not...) ?

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/1d5e7378-33c1-4176-8dce-9fb36f43f4ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aubrey

unread,
Oct 5, 2015, 5:15:48 PM10/5/15
to LoopbackJS

Simple TCI example:

Class inheritance:
User extends Person extends Base 

Table class inheritance:
user.idperson.idbase.id (all properties make the class)

Loopback model inheritance:
model User extends model Person extends model Base  (all properties make the model)

The loopback-connector does not support this (models are not joined). All properties are queried on the specific model's table.

Grt, A
Reply all
Reply to author
Forward
0 new messages