Yesterday I created a spike to test out mapping components. Fluent
Nhibernate's wiki shows the syntax like this:
# // mapping
# Component(x => x.Address, c =>
# {
# c.Map(x => x.Number);
# c.Map(x => x.Street);
# c.WithParentReference(x => x.Resident);
# });
I couldn't get it to work because of a syntax error so I did little
googling and found an example of this and the syntax was little
different. It went like this:
# // mapping
# Component<Address>(x => x.Address, c =>
# {
# c.Map(x => x.Number);
# c.Map(x => x.Street);
# c.WithParentReference(x => x.Resident);
# });
And that worked. So is the wiki showing the wrong syntax or am I using
a older build of the Fluent NHibernate?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---