-->
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.  [ 1 post ] 
Author Message
 Post subject: Overriding the implementation of getter in hibernate class
PostPosted: Sun Jul 24, 2005 11:23 pm 
Newbie

Joined: Tue Apr 12, 2005 12:07 pm
Posts: 6
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

I am trying to override the implemtation of one of the getters in hibernate classes. When i m trying to save the object i am getting the following exception.
Why i am doing this : I am doing this because i want to type cast the value coming from the DB and send it across.

e.g.

[code]public Object getValue() {
return convertTo(this.value, "INTEGER");
}
[/code]
[b]Hibernate version: 2.1 [/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():[/b]

[b]

Full stack trace of any exception that occurs:
[2005-07-23 16:41:26,123] [ExecuteThread: '6' for queue: 'default'] ERROR (catalog.dao.ProductCatalogBaseDAOHibernateImpl) - com.vodafone.wrp.componen
ts.catalog.dao.ProductCatalogBaseDAOHibernateImpl getEditProductAttributess: Error while fetching data Exception Message=[Exception occurred inside g
etter of com.vodafone.wrp.components.catalog.hibernate.ProductAttribute.value], Stacktrace=[net.sf.hibernate.PropertyAccessException: Exception occurr
ed inside getter of com.vodafone.wrp.components.catalog.hibernate.ProductAttribute.value
at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:99)
at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyValues(AbstractEntityPersister.java:253)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:907)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:868)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:790)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:749)

[/b]

[b]Name and version of the database you are using: Oracle 9i[/b]

[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.