This project has moved and is read-only. For the latest updates, please go here.

Vb.net and lazyload

Dec 9, 2010 at 10:52 AM
Edited Dec 9, 2010 at 10:53 AM

is the creation of a separate sql select statement supported for vb .net in the childlist selfload scenario?

i have the properties lazyload =true both on the child list and the child collection properties on the parent object.

Also selfload is set to true for the childlist in the child collection properties at the parent object.

Generate SP is set to true on all the objects and i have created a separate criteria object on the childlist

actually it all works apart from the sp generation.

Dec 9, 2010 at 11:22 AM

The new CSLAGenFork for 4.0 does not have vb templates yet so I am assuming you are using vb 3.5 templates.

I have always hand coded the SelfLoad child collection select for CSLAGen vb.net 3.5.

Going forward I think Tiago has some ideas for generating the sql, but for now I think you will have to hand code.

Bill

 

Dec 14, 2010 at 11:56 PM
Edited Dec 14, 2010 at 11:56 PM

Sorry folks, I don't quite understand the question. CTP2 changed a lot of things around. When child collection is SelfLoad you have to choose the LoadParameters among the child GET criteria (used to be the parent GET criteria). I have a use case that uses different parameters for the root object and for child SelfLoad and the sprocs are generated all right: one sproc for load the root object with given parameters and another for loading the child collection with different parameters. The only issue here is the VB templates that just don't exist. If not, please be more specific. This includes sending the Database and project XML file.

Regards,

Tiago Freitas Leal

Dec 15, 2010 at 8:35 AM

Sorry for not being more specific. When i say vb.net i mean using vb 3.5 templates.

Tiago i followed the path you described and most of the code is generated properly. In fact i created a test project for reference and sent it to your email now. In that project the path you described is followed but no sql is generated for the child collection.

Also you can see the error i described before concerning smartdate. When a new object is created, propertytype is set to string and thus some generated code is not generated correctly.

 

Dec 16, 2010 at 12:49 AM
Edited Dec 16, 2010 at 12:52 AM

Hi Pantelis,

There are a lot of features that were only implemented only for CSLA40 and C#. The intend was not to break existing projects. As far as I can see your project generates all the right sprocs, provided you set it to CSLA40 and C#. Concerning your settings of CSLA35 and VB I'm not sure how much CTP2 differs from other versions or even CslaGen. What did you loose?

Regards,

Tiago Freitas Leal

Dec 16, 2010 at 6:33 AM

I was just exploring the new features and wanted to know if they are currently supported when using vb. I know the focus is on CSLA40 and C#. All in all cslagenfork has added small features even for us vb users. Even though vb 4.0 is not currently supported, i find more potential in cslagenfork than cslagen. There are more updates and better direction.