AnantLabs / codesmith

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

CSLA: Child_Update must call FieldManager.UpdateChildren() for SwitchableObjects too #491

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an EditableRoot + EditableRootList
2. Associate in OneToMany a child entity with SwitchableObject + EditableChild.

What is the expected output? What do you see instead?
In the Child_Update() of EditableRoot object, the FieldManager.UpdateChildren() 
method must be called (as if it would be an EditableChild).
Instead of this call, a comment appears with the follow text:
>>> ' A child relationship exists on this Business Object but its 
>>> type is not a child type (E.G. EditableChild). 
>>> ' TODO: Please override OnChildUpdated() and update this child 
>>> manually.

But doing that is not possible, because OnChildUpdated partial method 
definition don't accept any parameters, and you would need to pass 'Me' and 
connection references to the call 'FieldManager.UpdateChildren(Me, connection)'.

What version of the product are you using?
CSLA-v3.0.0.1887

Please provide any additional information below.
Original forum post with more explanation: 
http://community.codesmithtools.com/Template_Frameworks/f/68/p/11261/43014.aspx#
43014

A attatch a SVN patch with the modification to the following files:
CSharp/Common/ChildUpdate.ParameterizedSQL.cst
CSharp/Common/ChildUpdate.StoredProcedures.cst
Source/CodeSmith.QuickStart/EntityCodeTemplate.cs
VisualBasic/Common/ChildUpdate.ParameterizedSQL.cst
VisualBasic/Common/ChildUpdate.StoredProcedures.cst

Original issue reported on code.google.com by bernyrod...@gmail.com on 18 Aug 2010 at 7:49

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 23 Aug 2010 at 2:24

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

fixed: Issue 491:   CSLA: Child_Update must call FieldManager.UpdateChildren() 
for SwitchableObjects too

Original comment by bniemyjski on 24 Aug 2010 at 5:38

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 24 Aug 2010 at 5:38