-->
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: Strategy for calculated columns
PostPosted: Tue Nov 02, 2004 9:36 am 
Newbie

Joined: Tue Nov 02, 2004 9:15 am
Posts: 5
Hibernate version:
2.1.4

Full stack trace of any exception that occurs:
Quote:
com.franke.pbs.persistence.PersistenceException: Could not apply configuration
at com.franke.pbs.persistence.HibernatePersistenceManager.setConfiguration(HibernatePersistenceManager.java:143)
at com.franke.pbs.persistence.HibernatePersistenceManager.init(HibernatePersistenceManager.java:152)
at com.franke.pbs.persistence.HibernatePersistenceManager.<init>(HibernatePersistenceManager.java:52)
at com.franke.pbs.persistence.TestHibernatePersistenceManager.setUp(TestHibernatePersistenceManager.java:41)
Caused by: net.sf.hibernate.MappingException: discriminator mapping required for polymorphic persistence
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:734)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:768)
at com.franke.pbs.persistence.HibernatePersistenceManager.setConfiguration(HibernatePersistenceManager.java:137)
... 12 more


Name and version of the database you are using:
Oracle 9.2.0.5


I have a object/table mapping which works correctly. Table: ORDER_HEADER, Class: OrderHeader

I have some stored functions that provide me with some (expensive to calculate) additional status information for a record in the ORDER_HEADER table.

I have been trying to use a <subclass> mapping to define these additional properties, so that they only get loaded (and calculated) when I need them. The problem, obviously, is that I don't have a discriminator column for this situation.

Is there anyway to achieve what I want without resorting to defining the complete mapping again?

Thanks in advance for any info,
David Sykes


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2004 11:53 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
not exactly what you need but may help
http://www.hibernate.org/41.html

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Tue Nov 02, 2004 12:40 pm 
Newbie

Joined: Tue Nov 02, 2004 9:15 am
Posts: 5
Anthony,

thanks for the reply. Not exactly what I want, but certainly extremely close to it.
I think I should be able to work something from here. At least to get me going.

Thanks again,
David Sykes


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.