-->
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.  [ 4 posts ] 
Author Message
 Post subject: HBM2JAVA w/ EJB3 + <Version>
PostPosted: Tue Aug 21, 2007 6:15 pm 
Newbie

Joined: Tue Aug 21, 2007 6:06 pm
Posts: 3
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate Tools version: 3.2.0Beta9

Mapping documents:
Code:
  <class name="Person" table="person">
    <id column="id" length="22" name="id" type="string"></id>
    <version type="timestamp" name="lastUpdateDT" column="update_dt" generated="never" unsaved-value="null" />
    <property name="name" column="name" not-null="true" type="string" length="150" />
</hibernate-mapping>



When I use the HBM2JAVA tool with the 'ejb' setting to generate EJB annotations, the <version> mapping doesn't get mapped as a version @Version in the resulting java class. See below:
Code:
    @Column(name="update_dt", nullable=false)
    public Date getLastUpdateDT() {
        return this.lastUpdateDT;
    }
   
    public void setLastUpdateDT(Date lastUpdateDT) {
        this.lastUpdateDT = lastUpdateDT;
    }


Am I doing something wrong, or does the mapping of Version properties not work with HBM2JAVA?

thanks,
Parker


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 21, 2007 8:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I dont have time to look at the code at the moment but I would suggest you create a jira entry for it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 3:27 pm 
Newbie

Joined: Tue Aug 21, 2007 6:06 pm
Posts: 3
OK. Done.

http://opensource.atlassian.com/project ... se/HBX-981

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 3:31 pm 
Newbie

Joined: Tue Aug 21, 2007 6:06 pm
Posts: 3
Doh.. looks like its a duplicate. Should be fixed in Beta10. Updating and validating. Thanks.

http://opensource.atlassian.com/project ... se/HBX-942

PW


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.