create join and resolve it using ORM

Home Forums kbmMW create join and resolve it using ORM

This topic contains 2 replies, has 2 voices, and was last updated by  mrluigi2017 8 months, 1 week ago.

  • Author
  • #53420



    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!


  • #53426


    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.

  • #53428


    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 🙂 )


You must be logged in to reply to this topic.