-->
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: version and timestamp in one table
PostPosted: Tue Mar 09, 2004 3:56 am 
Newbie

Joined: Sat Jan 31, 2004 9:36 am
Posts: 13
Location: Zurich
Hello,

I'm using
    Hibernate 2.1.1
    MySQL 4.0.15
    XDoclet
.

I want to have the version of a record in the database and the automatic timestamp. If I try

Code:
<hibernate-mapping>
    <class...

        <version
            name="versionInDB"
            type="java.lang.Long"
            column="versionInDB"
        />

        <timestamp
            name="lastUpdate"
            column="lastUpdate"
        />

        <property...



I get the following exception:

[code]
[schemaexport] - Error parsing XML: /home/ollin/eclipse_workspaces/gpl_workspace/DokuStelle/DokuStelleWeb/WEB-INF/classes/org/dokustelle/model/work/Hauptstudienrichtung.hbm.xml(29) In Element "class" ist hier "timestamp" nicht zul


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 6:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
No, either timestamp or version. Use a trigger or something for the timestamp updating.


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.