-->
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.  [ 6 posts ] 
Author Message
 Post subject: column index
PostPosted: Sun Jun 04, 2006 9:00 am 
Newbie

Joined: Sun Jun 04, 2006 8:46 am
Posts: 13
Isn't this snippet of my mapping file supposed to create an index?

Code:
        <property
            name="name"
            type="java.lang.String"
            update="true"
            insert="true"
        >
            <column
                name="mname"
                index="nameindex"
                not-null="true"
            />
        </property>


I use the hibernate 3.1.3 and mysql 4.1.12a.

_________________
--- cogens


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 11:14 am 
Newbie

Joined: Sun Jun 04, 2006 8:46 am
Posts: 13
Calling "SchemaExportTask" from within ant creates the index,
"<property name="hbm2ddl.auto">update</property>" in hibernate.cnf.xml does not! That is odd!

_________________
--- cogens


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 12:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
schemaexport!=schemaupdate

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 1:10 pm 
Newbie

Joined: Sun Jun 04, 2006 8:46 am
Posts: 13
"Update" is the behaviour I want, so it would create the tables on first start up and only applies changes afterwarts. But with "update" the tables are created without mentioned index, whereas with "create" the tables are created with the index (but unfortunatly on each restart). Why is that?

_________________
--- cogens


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 1:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
because noone contributed that functionallity.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 1:59 pm 
Newbie

Joined: Sun Jun 04, 2006 8:46 am
Posts: 13
max wrote:
because noone contributed that functionallity.


lol

_________________
--- cogens


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