c# - Define generator for composite-id property in NHibernate -


i've defined composite-id nhibernate database model. seems work, cannot set generator 1 key-property.

is possible define generator key-propery in composite-id?

c# nhibernate model

public const string str_id = "id"; public const string str_shardkey = "shardkey";  [compositeid(-4)] [keyproperty(-3, name = str_id, column = str_id)] [keyproperty(-2, name = str_shardkey , column = str_shardkey )] [generator(-1, class = "guid.comb")] public virtual guid? id { get; set; }  [column(name = str_shardkey )] public virtual int shardkey{ get; set; } 

xml mapping

<composite-id>     <key-property name="id" column="id" />     <key-property name="shardkey" column="shardkey" /> </composite-id> 

shouldn't there generator tag <generator class="guid.comb" /> somewhere?


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -