NHIBERNATE 3.3: Does the composite-id generate a Key property?

I have read that this mapping is impossible in NHibernate 3.3:





****


Basically I need a composite id attribute to be automatically calculated by NH.

There may be one Tips for getting similarities?

Thanks in advance.

You have to implement it yourself, because CompositeIds always

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

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4484 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.