I know and i don't do that :-)
What I do is, i use an own IdentifierGenerator inherited from TableGenerator. There i have to check the following:

public override object Generate(ISessionImplementor session, object obj)
{
if( obj is Thp5.Domain.Base.Patient.PatientInfo )
{
int nID = 0;
if( int.TryParse((obj as Domain.Base.PInfo).StrIdent,out nID) )
{
return nID;
}
return null;
}
return base.Generate(session,obj);

This is because the ID is calculated from the string ID (don't ask about it..it has to be this way)

Is this the wrong way?

Am schrieb "José F. Romaniello" <[email protected]>:
you should not modify the POIDs of your entities instances

2011/2/25 [email protected]>

Hi all,

i get the following exception and don't know exactly what i should do about it:

"identifier of an instance of Domain.Base.PInfo was altered from 102472 to 102472"


Any hint?

Thanks




--

You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.










--

You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.

--
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to