• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

no natural-id property defined; need to specify [key] in generator parameters Error.

 
Mel Cen
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i'm getting this error : no natural-id property defined; need to specify [key] in generator parameters

this is my mapping file.

<hibernate-mapping>
<class name="Login.LoginBean" table=" User " >
<id column="userID" name="userId" type="int">
<generator class="identity"/>
</id>
<property column="userName" name="userName" type="string"/>
<property column="userPassword" name="userPassword" type="string"/>
</class>
</hibernate-mapping>

i have no idea why it does not work ! anyone can give me a clue ?

how do i map to a view without a primary key ?
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic