-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Can middlegen generate the <version> tag for composite
PostPosted: Wed Nov 17, 2004 12:01 pm 
Newbie

Joined: Fri Oct 29, 2004 1:05 pm
Posts: 10
Hi,

I have tables with composite keys everywhere (I *hate* legacy databases). I was hoping to be able to use hibernate's saveOrUpdate() method with code generated by middlegen.

The documentaion for Hibernate says that composite keys must be assigne and use some sort of versioning (by timestamp or by version). When I look at the hbm.xml file generated by middlegen, there is no version or unsaved-value information.

I tried to see how to specify this information but I don't see it. Is this a case of me not looking in the right place? Or do I have to add it manually after the fact? If it's the former, where should I be looking?

Thanks,

L


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 8:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
It has support for the version tag. Find the appropriate field that will be the version value. Change the property class to be version rather than a standard property (use the dropdown to select the classification).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.