-->
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: Overriding the implementation of getter in hibernate class
PostPosted: Sat Jul 23, 2005 7:29 am 
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");
    }


Hibernate version: 2.1

Mapping documents:

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


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)


Name and version of the database you are using: Oracle 9i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 23, 2005 7:33 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Use the regular forum.


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.