-->
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: Migration Problem
PostPosted: Mon Jan 30, 2006 7:55 am 
Newbie

Joined: Fri Jan 13, 2006 8:06 am
Posts: 2
Location: Baroda
Hello everbody...

I download hibernate3.1 and replace with hibernate3.0 in my project.

It gives some error in save and update method.

in earliear version i used session.save(object, serializable id) but in new version this method is remove from org.hibernate.Session. and depricated in org.hibernate.classic.Session.

in new version there is only two method for save
1. save(object)
2. save(entityName, object)

if i used any of this method hibernate gives me "There is no Identifier found" this problem also appear in previous version but i can solved with save(object,serializable id).

please give me more information.. how to solve my problem.

regrards,
Nirav Pandya.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 8:15 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
Hello,
I think in the release notes was mentioned that non existence of primary key is handled stricter.

You should carefully read
http://www.hibernate.org/250.html
+ the release nodes when you update.

May be post your mapping, so that everybody can see what kind of mappings does not work any more.

Regards Sebastian

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 7:03 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
We are planning to remove support for domain objects which do not define primary key properties; hence the reason for moving those methods to the classic.Session.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 2:40 pm 
Newbie

Joined: Fri Jan 23, 2004 3:37 pm
Posts: 14
You should consider that removing the support for save(object, identifier) removes the possibility to have a "generated by default" primary key that can have an assigned value.
I have upgraded to version 3.1.2 and noticed that I had to use the classic session.
In my case, I need an entity to have a few "standard" records (which I must assign a known id value) and other "custom" values, that the database (mysql) assigns.
If that is permanently removed, I won't be able to upgrate to newer versions...


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.