AnantLabs / codesmith

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

CSLA: Object params needed on partial methods #455

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an EditableChild+EditableChildList with a foreign key pointing to 
another table.
2. A Child_Insert() method is generated on the EditableChild object with the 
foreign object as parameter, in addition to the connection parameter.
3. Into the Child_Insert() the partial method OnChildInserting() is called. 

Same case for Child_Update().

What is the expected output? What do you see instead?
The call to the partial method OnChildInserting() into the Child_Insert() must 
have the foreign object reference passed to Child_Insert(), in this way we can 
access its properties.

For more info see the thread:
http://community.codesmithtools.com/Template_Frameworks/f/68/t/11166.aspx 

Original issue reported on code.google.com by bernyrod...@gmail.com on 21 Jul 2010 at 8:14

GoogleCodeExporter commented 9 years ago
Hello,

This will not make it into the 3.0 release but will in a build shortly there 
after.

Thanks
-Blake

Original comment by bniemyjski on 23 Jul 2010 at 4:37

GoogleCodeExporter commented 9 years ago
I have attached a SVN patch with the modifications needed to address this issue 
(only for the Child_Insert and OnChildInserting case).

I hope that help you in anyway.

Original comment by bernyrod...@gmail.com on 7 Aug 2010 at 11:01

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, one modification to my patch (added comma separation for object params 
in Child_Insert).

Original comment by bernyrod...@gmail.com on 7 Aug 2010 at 11:32

Attachments:

GoogleCodeExporter commented 9 years ago
Another modification for my patch, for child partial methods of Switchable 
objects (It seem that this patch works well, I am using it for last 10 days 
without problems).

Original comment by bernyrod...@gmail.com on 17 Aug 2010 at 3:35

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for this patch. Is everything still working great for you? I'm thinking 
about adding this into v3.0.1 or v3.0.2

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 10 Sep 2010 at 2:32

GoogleCodeExporter commented 9 years ago
Yes, Blake.
I use it intensively in my generated code without problems.
It create aditional partial methods with parent params, therefore don't 
interfere with nothing.

Original comment by bernyrod...@gmail.com on 10 Sep 2010 at 3:02

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 9 Mar 2012 at 1:28

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r2536.

Added additional overloads for OnChildInserting and OnChildUpdating

Original comment by bniemyjski on 12 Mar 2012 at 8:11

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 12 Mar 2012 at 8:11