-->
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: index on version or timestamp columns
PostPosted: Sun Feb 21, 2010 9:58 am 
Newbie

Joined: Fri Dec 04, 2009 4:42 am
Posts: 5
Hi everyone.

The question is "can I put an index on version or timestamp attributes on mapping xml file".

Since there isn't any element in timestamp or version attributes, how can ı solve the issue.

PS : I am using hibernate 2.18

Kind Regards...

_________________
----
Melih
melihbirim.com


Top
 Profile  
 
 Post subject: Re: index on version or timestamp columns
PostPosted: Mon Feb 22, 2010 3:16 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Most elements that has a column attribute can also accept a <column> sub-tag. This tag can define an index. See http://docs.jboss.org/hibernate/stable/ ... etguide-s1 for some examples.


Top
 Profile  
 
 Post subject: Re: index on version or timestamp columns
PostPosted: Mon Feb 22, 2010 4:01 am 
Newbie

Joined: Fri Dec 04, 2009 4:42 am
Posts: 5
seems that "timestamp" does not have "column" sub attribute.

_________________
----
Melih
melihbirim.com


Top
 Profile  
 
 Post subject: Re: index on version or timestamp columns
PostPosted: Mon Feb 22, 2010 4:07 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
From the documentation:

Quote:
<Timestamp> is equivalent to <version type="timestamp">


I just noticed that you use Hibernate 2... so I have no idea if you can do this or not... The above link and information is for Hibernate 3.3


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.