key « Property « JPA Q&A

1. Object as property when part of key

I am finding that Hibernate does a great job of mapping a key to an object when the foeeigh key is a column in hte table as below where CustomerID maps to CustomerImpl

2. key-many-to-one property-ref

3. property-ref and key-many-to-one

Full stack trace of any exception that occurs: net.sf.hibernate.MappingException: property-ref not found: paymentTracking in class: com.jms.server.persistence.beans.accounting.HBPaymentSubjectBean at net.sf.hibernate.cfg.Configuration.secondPassCompile( at net.sf.hibernate.cfg.Configuration.buildSessionFactory( at com.server.init.CLocalHibernateInitializer.initHibernate( at com.server.init.CLocalHibernateInitializer.( at com.server.init.CLocalHibernateInitializer.init( at com.CJmsBaseTestCase.initHibernate( at com.CJmsBaseTestCase.initialize( at com.CJmsBaseTestCase.setUp( at com.jms.server.persistence.HBAccountingTest.setUp( at junit.framework.TestCase.runBare( at junit.framework.TestResult$1.protect( at junit.framework.TestResult.runProtected( at at at junit.framework.TestSuite.runTest( at at junit.textui.TestRunner.doRun( at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun( at junit.textui.TestRunner.start( at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs( at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart( at com.intellij.rt.execution.junit2.JUnitStarter.main( java.lang.RuntimeException: ...

4. property-ref for key-many-to-one

Is there anybody that can help me? Maybe I should demonstrate the problem more generalized. I got a table A: PK_A - primary key I got another table B: PK_A - FK pointing to A; part of PK INDEX_B - an index to allow one-to-many relations between A and B; part of PK And finally there is another table C that ...