****
Basically I need a composite id attribute to be automatically calculated by NH.
There may be one Tips for getting similarities?
Thanks in advance.
class Digital
{
private static long number = 0;
private static long NextNumber()
{
return Interlocked.Increment(ref number);
}
public Digital()
{
Id = NextNumber ();
}
}
I have read that this mapping is not possible in NHibernate 3.3:
****
Basically I need a composite id Attributes are automatically calculated by NH.
Maybe there is a trick to get similarities?
Thanks in advance.
You have to implement it yourself, because CompositeIds always generate for NH allocation
< p>
class Digital
{
private static long number = 0;
private static long NextNumber()
{
return Interlocked.Increment(ref number);
}
public Digital()
{
Id = NextNumber();
}
}