Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / OpenAccess ORM > OpenAccess ORM Free Edition > Dto T4 template stupid question

Not answered Dto T4 template stupid question

Feed from this thread
  • LordRevan007 avatar

    Posted on Jan 13, 2012 (permalink)

    Hello to all, I downloaded T4 Dto Template from Code Library. I modified the template to suit my need, but somenthing draw my attention. From what I see in the Dto objects only the 1:many relationship is mapped, the many:1 isn't.

    Why is this done? How does Telerik recommends creating Dto object using the template from code library or there is another way?
    Thanks in advance,
    LordRevan007
     

    Reply

  • Alexander Alexander admin's avatar

    Posted on Jan 17, 2012 (permalink)

    Hello LordRevan007,

    This DTO template generates only the "collection" part of 1:N associations. For M:N associations, only one of the association ends is generated, which is a collection as well. If the second end was generated in parallel, this would easily lead to errors because of cyclic references during serialization of the object graph. And this is actually the main reason for generating the code this way.
    Hope that helps.

    Greetings,
    Alexander
    the Telerik team
    Want to use Telerik OpenAccess with SQL Azure? Download the trial version today. 

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / OpenAccess ORM > OpenAccess ORM Free Edition > Dto T4 template stupid question