Hi there,
I'm trying to avoid this same problem (having the parent's FK in the
child objects).
So I got your idea, Andre, and it sounds like it should work, except
that I can't find any right-click-menu option which says Create ->
*Child Collection*. I have got Read Only Collection, Editable Root
Collection, Editable Child Collection and Name Value List.
Do you mean the Editable Child Collection? Or a Read Only Collection?
My scenario is: I want to be able to show a DataGrid with a list of
Cities. The City Table is connected to a State Table through a column
named "fkState". How would I expose the State Name property? I don't
want to present the GUID (fkState) to the user.
I've been working with CSLA for 2,5 years now but just realized I've
underused it. So many features and I just ignore them.
Sorry if I seem a bit stupid. =)
Cheers,
On 16 nov, 14:00, Andrés Villanueva <
xal1...@gmail.com> wrote:
> Thechildobject should not contain the fkproperty. That is given by
> it'sparentrelationship. Adding thatpropertyto thechildobject
> opens the door to big trouble, because you could potentially have a
> root object with ID = 26 and set the fk in thechildobject to, say,
> 27.
>
> So, remove the FKpropertyfrom thechildobject and let that be
> determined by theparentobject and you should be fine. This will also
> solve your other issue with the dataset.
>
> (Hint: when creatingchildcollections, select all columns in the