openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: Unenhanced Classes
Date Tue, 14 Aug 2007 00:23:46 GMT
On Aug 10, 2007, at 3:44 PM, Patrick Linskey wrote:

>> Anyway, any ideas on a work around for these problems or is this
>> something I can help with?
>
> Failing tests would be swell -- just make the test name be 'xtestFoo'
> or something so that we don't pick it up.
>
> The permanent lazy loading problem is that without redefinition, with
> all field access  instances, and with field or prop access with
> user-created instances, automatic lazy loading for single-valued
> fields is unavailable, since we cannot receive notification of when to
> do the lazy load. I believe that we have code in place to ignore the
> lazy directive in these situations, but that could be broken /
> unimplemented.

After about 2 days of painful hacking I finally have a test case that  
reproduce this problem.  It is very difficult to get unenhanced an  
enhanced in the same test.  The test is in OpenEJB at  
org.apache.openejb.core.cmp.jpa.UnenhancedTest for now, but tomorrow  
I'll try to integrate them into OpenJPA.

In the mean time, here is what I found out about the failures:

Unenhanced, complex primary keys throw an exception when calling  
em.persist(myObject), but only if the id fields are in a  
MappedSuperclass.

Unenhanced, auto generated id's are not filled in after a persist  
with flush.  Strangely, a String auto generated pk seems to work  
file, but a long throws an exception.

Unenhanced, OneToMany (collection valued relationship) are null when  
loaded from the database.


Anyway, with some luck, I'll be able to port over the classes tomorrow.

-dain

Mime
View raw message