- This topic has 2 replies, 2 voices, and was last updated 6 years, 10 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Hi,
When I used query services it was easy to resolve joins but what is the best way to join with ORM so that the join can be resolved?
Thanks in advance!
Hi,
The ORM is a different beast although it deep down completely relies on the resolving features you already are familiar with.
As the ORM is object based, you will need to Persist each object that you want to save.
If an object refers to other objects, the ORM (in the current configuration) do not autopersist the other objects. You would have to do that yourself by iterating them and call Persist for each of the ones you want to store.
What I try to accomplish is that I can resolve a join with ORM and that I can show the join (virtual table) as one dataset. Is there an easy way to do that?
The only solution I see now is that in case of a TPerson with a TAddress is to add all TAddress properties as virtual fields to a TPersonWithAddress object and create a TAddress object and copy the values from the virtual addresss fields from TPersonWithAddress before persisting. (That’s an ugly sentence 🙂 )