File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Auto Generator in composite key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Auto Generator in composite key" Watch "Auto Generator in composite key" New topic
Author

Auto Generator in composite key

Sakthi Ramasamy
Greenhorn

Joined: Jun 02, 2008
Posts: 17
Hi,

Could you please let me know how to make the CAMPAIGN_ID in the composite key to be auto generated [Sequence starting from 1000 and thereby incremented by 1]. I have a MySQL query for Sequence generation.

The problem is, whenever i create a campaign, after 2, its getting updated instead of insert. Is it because of hbm files or is it because of some session updation in java code.

I couldn't come to conclusion why it is behaving so.




Thanks in advance for your time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Auto Generator in composite key