• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sequnce in hibernate

 
Saravanan Subramani
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible? if i have composite key , one of the key should be have generated oracle sequence.

<composite-id>
<key-property name="batchId" column="H1SD_XB_BATCH_ID"></key-property>
<key-property name="taskId" column="H1SD_XB_TASK_ID">
<generator class="sequence">
<param name="sequence">h1sd_xb_task_seq</param>
</generator>
</key-property>
</composite-id>
<property name=
......


Ihis is not a proper syntax (throws error.invalid mapping exception).
Please help me how to configure for this situation.
Thanks in advance
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ssaravanan saravanan" please check your private messages.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ssaravanan saravanan:
Is it possible? if i have composite key , one of the key should be have generated oracle sequence.

If you are using a sequence, why use a composite key?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic