-->
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: New tables can't be written to
PostPosted: Sun Mar 27, 2005 2:46 am 
Newbie

Joined: Sat Mar 12, 2005 1:42 pm
Posts: 7
Location: MN
Hibernate version:
2.0

Name and version of the database you are using:
MySQL 4.1


I have an interesting problem that I can't quite figure out. Here is the scenario:

1. I have many existing tables on a MySQL install and they all work great. I can write to them query them, etc, with Hibernate.

2. I go to create a new table on this MySQL install the table creates fine and using MyEclipseIDE the hibernate config files are created perfectly.

3. I try to Session.save(newTablesObject) on the new table's object and it saves successfully according to the client machine, and I do a Session.flush() just to make sure the save made it up to the server.

Here in lies the problem. That object's row, which is of my new table, never shows up on the server. It does stay in Hibernate's cache though and if I query for those records it finds them in cache and returns them. The weird part is that I can update,save,query my other tables created last week just fine and the data shows up on the server! I have even done updates to my older tables and regenerated the hibernate config and they still work just fine. It is only with new tables!!???

So next I tried creating a table in MySQL 4.1 on my localhost and created the hibernate mapping. On my local host the new table works perfect and information is saved to a table row.

I am totally confused as to why it works on my localhost but not on the remote machine. Does anybody have any idea's as to what might be wrong?

Aaron Bartell
http://mowyourlawn.com


Top
 Profile  
 
 Post subject: Re: New tables can't be written to
PostPosted: Sun Mar 27, 2005 10:58 pm 
Newbie

Joined: Sat Mar 12, 2005 1:42 pm
Posts: 7
Location: MN
I resolved this and want to post my results for the archives. The default DB engine got changed to InnoDB vs MyISAM so when I was creating new tables it wasn't using MyISAM like I thought it was. Once I changed the tables back to MyISAM everything was honky-dory.

This leaves me semi-curious as to whether Hibernate should work regardless of the database engine type. In my mind it should...

Thoughts?
Aaron Bartell


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.