Add property-ref and not-found attributes in mapping by code

Description

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?
});

Unfortunately I'm dealing with legacy databases and this issues come up to often.

Environment

None

Attachments

1

Activity

Show:

Oskar Berggren 
May 30, 2012 at 6:32 PM

Closing issues fixed in 3.3.1.CR1.

Pedro Alvarado 
January 23, 2012 at 12:31 AM

I've got a pull request on GitHub that addresses this issue.
https://github.com/nhibernate/nhibernate-core/pull/62

Oliver Joest 
January 5, 2012 at 3:54 PM

The PropertyRef seems missing also from Join with mapping ByCode, would be very helpful while dealing with Legacy DBs.

Rui Lima 
December 10, 2011 at 4:53 PM

Hello guys, I was faving this problem also.
Come into a quick fix, please see attachement.
I know it's not the most correct way, but I needed this fixed ASAP. I'm sharing with you if you consider it good for your projects use it.

Fatih Ender 
November 17, 2011 at 10:30 AM

i just need the property-ref attribute to use with
legacy database

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created August 3, 2011 at 10:54 AM
Updated July 8, 2015 at 4:41 AM
Resolved January 31, 2012 at 4:57 PM
Who's Looking?