Mapping by code, "property-ref" and "not-found" in ManyToOne()

33 views
Skip to first unread message

Nicolás Sabena

unread,
Aug 1, 2011, 10:42:57 AM8/1/11
to nhusers
Hi. I am trying to convert a few mappings to NH 3.2's mapping by code.
I cannot find the way to indicate what was done with the "property-
ref" and "not-found" attributes in a ManyToOne() relationship.

Eg:
<many-to-one
name="Client"
column="cCode"
property-ref="ClientCode" // the non-id column to use in the join
not-found="ignore"
/>

ManyToOne(x => x.CardHolder, map => {
map.Column("sClient");
map.PropertyRef(x => x.ClientCode); // No
PropertyRef() method available?
map.NotFound(NotFoundOptions.Ignore); // No NotFound()
method available?
});

Is there an option to accomplish this, or should I use xml mappings
with these cases?

Fabio Maulo

unread,
Aug 1, 2011, 7:02:41 PM8/1/11
to nhu...@googlegroups.com
If not implemented please file a JIRA ticket
Reply all
Reply to author
Forward
0 new messages