How to include join table fields or order-by in entities?

24 views
Skip to first unread message

Andy Parsons

unread,
Apr 5, 2015, 8:45:33 PM4/5/15
to sqlk...@googlegroups.com
I have a many-to-many relationship between 2 tables (collections and items) and the join table contains additional data besides the left and right foreign keys. Specifically, it contains a "sequence" field which dictates the order of the items in the collection. Is there a way to include this field in an expression such as:

(select collections (with items) ...

or alternatively :order by the "sequence" field value?

Thanks for any insight!

Immo Heikkinen

unread,
Apr 6, 2015, 3:55:22 AM4/6/15
to sqlk...@googlegroups.com
In short, it is not possible without creating entity for the link table. Here's earlier discussion on it:




--
You received this message because you are subscribed to the Google Groups "Korma" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlkorma+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Parsons

unread,
Apr 6, 2015, 11:47:51 AM4/6/15
to sqlk...@googlegroups.com
Thanks- apologies for not catching the earlier thread in my search. This approach works perfectly.

You received this message because you are subscribed to a topic in the Google Groups "Korma" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sqlkorma/TIU3a1VE304/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sqlkorma+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages