Reputation: 722
I want to write join condition explicitly on non key columns using JDOQL in datanucleus.Is it Possible to write in datanucleus?If yes how can we write using JDOQL?
Upvotes: 0
Views: 74
Reputation: 11531
You don't write JOINs in JDOQL. That is the whole point of JDOQL ... it is Java syntax, and using object relationaships. If your object "model" has assorted longs/ints around that you think are relationships then you need to revisit your design, since that is not O-O. The same applies to JPA also FWIW, except that you can do explicit joins but what is joined on is to all intents and purposes the relation field only (i.e not on non-key columns).
You could obviously put an extra condition (for the non-key columns) into the FILTER of the JDOQL query (as long as they have a field in the persistable class) that equates to what you want to do.
Upvotes: 1