Different join types, weaving and spring [message #508860] |
Wed, 20 January 2010 10:08  |
Eclipse User |
|
|
|
Hi,
I'm using spring 3.0 and EL 2.0 with jpa 2. Everything was going fine until I tried to map a simple class hierarchy. When I use @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) it works fine. When I use @Inheritance(strategy = InheritanceType.JOINED) it crashes with thousands of lines of exceptions, I think, because weaving is failing somehow and the implicit OneToOne that implements the join can't find the woven primary/foreign keys.
For now, I can just go with the TABLE_PER_CLASS option, but if the underlying schema is ever shared by other platforms, I would prefer to be using JOINED.
Matthew
|
|
|
|
|
|
Re: Different join types, weaving and spring [message #509871 is a reply to message #508860] |
Mon, 25 January 2010 11:14  |
Eclipse User |
|
|
|
Well something is obviously different, my guess would be you are trigger the loading of the class before accessing the Spring context in the one that fails to weave. You can either disable weaving, use static weaving, or ensure you access you context before loading your classes.
Hibernate does not do weaving, so will not have the same issue.
|
|
|
Powered by
FUDForum. Page generated in 0.03689 seconds