Hi all, I had write a simple apps which using the Hibernate Annotation (3.2.1 GA), please reference to the attached.
http://www.sharebigfile.com/file/124964/src-zip.html
Problem:
When I run the test.Main, throw have an exception while passing the annotation:
Code:
Exception in thread "main" org.hibernate.MappingException: Unable to find column with logical name: customerID in ShoppingBasket
at org.hibernate.cfg.Ejb3JoinColumn.checkReferencedColumnsType(Ejb3JoinColumn.java:383)
at org.hibernate.cfg.BinderHelper.createSyntheticPropertyReference(BinderHelper.java:88)
at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:63)
at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:428)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:286)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at test.Main.main(Main.java:19)
But when I change the table name of ShoppingBaskets to "Basket", then the problem solved.