From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books
Thanks
-Blake Niemyjski (Author of the CodeSmith CSLA templates).
Blake-
I have grabbed your templates from the nightly build and am attempting to use them. What I am not seeing is the child properties being created for an object. For example, I have a 'Patient' table and am creating a ReadOnlyRoot for it. The Patient table has a couple of tables that have PatientId as their foreign key and are set up to be 1 to many with Patient. So, a Patient can have several addresses, i.e. PatientAddress. But, the PatientAddress property is not getting created in my PatientInfo class. Should it?
Tks.
Hello,
Currently read only stereo types do not have any child properties generated. I wasn't sure if this was standard practice or not. My thoughts were that read only stereo types were usually used one deep. What are your thoughts on this?
-Blake Niemyjski
Rizshe,
I'm using the latest nightly build of Codemiths CSLA templates and have this working.
If you are using the Entities.cst and the resulting Entity.csp file in Visual Studio you need to do the following.
I've found I create a series of entries in the Entity.csp Codesmith project file pointing to the Entity.cst template and use these options so codesmith generates my CSLA business objects to suit my requirements. Often the Codesmith templates are too aggressive creating the relationships, especially in highly normalized databases (which isn't codesmiths templates fault, more the database relationships your working with).
Jamie Clayton
Senior Application Developer
Jenasys Design
Gort,
I'm working with the nightly builds of Codesmiths CSLA. I must admit to have only generated one readonly list at this stage and had to do some manual code changes to the generated output to make it compile.
When I get to migrating my existing Readonly CSLA objects to the new Codesmith templates I'll report any errors to http://code.google.com/p/codesmith/issues/list. Blake and Codesmith have been outstanding at template changes to fix issues identified.
From a design perspective I've only ever design parent readonly lists and readonly child items, so I can populate combo boxes or search lists. I'm assuming your suggesting that the Codesmith templates should also generate Grandchildren + any other database relationships when you create a readonly stereotype via codesmiths templates. Is that what you are suggesting?