AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

Self Relations: No lazy load property is generated for the foreign key when a table has relation to itself. #514

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate the table using attached script file for sql server.
2. Run Codesmith and generated code for the table created in step 1.
3. Notice the generated code does not include lazy load property to parent.

What is the expected output? What do you see instead?
The lazy load property should be generated for foreign key kParent.

What version of the product are you using?
Latest one.

Please provide any additional information below.

Original issue reported on code.google.com by malik.ab...@gmail.com on 6 Oct 2010 at 6:22

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

We don't generate this by default but this could be a good thing to generate 
(need to discuss this with the team). How large is your object graph when 
loading this table?

If you go into the DBML designer if you set this property to true we will 
preserve this attribute or if you manually add the attribute it will be 
preserved after regeneration (IsDelayLoaded="true").

Do you think this should be generated all the time for self referencing tables?

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 7 Oct 2010 at 11:20