-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate changes my MySQL database
PostPosted: Mon Aug 23, 2004 9:40 am 
Newbie

Joined: Mon Aug 23, 2004 9:23 am
Posts: 12
Hibernate version:2.1
Database version:MySQL

Does anyone know what happens with MySQL and hibernate?
I just execute a simple query over my MySQL database and there are indices in one of the tables(for foreign keys). After executing my code, all indices in my database tables are duplicated!!! The only "thing" that connects to my database is Hibernate and the code is just:

Code:
...
empresaSession = test.factoryEmpresa.openSession();
geoxSession = test.factoryGeox.openSession();
...
tx = empresaSession.beginTransaction();

/* empresaTablesNames is an enumeration with strings */
/* stringshandler returns just a "from ..." */
/* ObjectsTWO is a hashtable  */

while (empresaTablesNames.hasMoreElements()) {
      String empresaClass = (String)(empresaTablesNames.nextElement());
               String query = stringsHandler.getSelectFrom(empresaClass);
               ObjectsTWO.put(empresaClass, empresaSession.find(query));
}
...
empresaSession.close();



Thanks and kind regards,
Jose


Top
 Profile  
 
 Post subject: solved
PostPosted: Mon Aug 23, 2004 12:07 pm 
Newbie

Joined: Mon Aug 23, 2004 9:23 am
Posts: 12
Ufff, I found the solution here:

http://opensource.atlassian.com/project ... wse/HB-720

It seems to be a problem with hbm2ddl and mysql dialect.

Bye


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 23, 2004 12:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use 2.1.6


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