-->
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: Problem while adding a new attrbute to a persisted object
PostPosted: Thu Feb 16, 2006 1:28 pm 
Newbie

Joined: Thu Feb 16, 2006 2:15 am
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

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

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:



I am using the Spring,Hibernate 3.1 and MySQL 5.0.18


When i tried to persist objects they persisted in the database with no issues. Now when I added an extra attriubte to the object and try to persist that , it doesn't persist.

In the HBM files I can see that mapping for the new attribute but for some reason that is not being refelected in the database

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 1:31 pm 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
can you please post the mapping of the new property and a log snippet in which hibernate writes all the stuff to the database?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 17, 2006 12:18 am 
Newbie

Joined: Thu Feb 16, 2006 2:15 am
Posts: 2
Hey Mike

I found out the soln. Wierd one though

In the webapps dir of Tomcat there were 2 webapps pretty much similar in the sense having the same database structure and trying to access the same schema.
One had the previous hbm and the other one the new hbm.

So whrn Tomcat is started , the hbm files are used to create the database structure and at that point whichever hbm files make it first gets persisted


hope u got it
thanks anyways


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.