Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Null @Id again after query execution

I'm not quite sure what the issue was but remember something cropping up about having a mapped superclass extend an entity or embeddable.  Monday is a holiday though, so You might not get much dev input until Tuesday.  It might be worth a shot changing the mapped superclass to an entity to test as well since it doesn't seem valid anyway - the spec states it is an entity because it extends one anyway.

Best regards
Chris

On 2012-09-01, at 1:19 AM, Laird Nelson <ljnelson@xxxxxxxxx> wrote:

On Fri, Aug 31, 2012 at 8:02 PM, Laird Nelson <ljnelson@xxxxxxxxx> wrote:
The id and version attributes are still null; the EclipseLink-weaved _persistence_* fields are still set to what I would expect them to be set to.  

OK, while I did not reproduce the issue in a unit test featuring either EclipseLink as run via Persistence#createEntityManagerFactory() or via embedded GlassFish, I did "fix" the issue by entering panic mode in a suave and elegant fashion and coolly turning off various obscure weaving parameters.

The one that did the trick was this one:

<property name="eclipselink.weaving.internal" value="false"/>

With that property set like that, and no others (other than logging ones) in my persistence unit, the ID fields began to be non-null again.

I selected this property to tinker with because of the explicit mention in the documentation (http://www.eclipse.org/eclipselink/api/2.4/org/eclipse/persistence/config/PersistenceUnitProperties.html#WEAVING_INTERNAL) of the caching of primary keys.  Clearly there is work to be done here.  And I'm tempted to see if disabling one of the other obscure weaving parameters would also do the trick (fetch groups, perhaps, which I don't make use of?); I've seen that one mentioned in quite a few bug reports.

I would be quite grateful if someone could tell me what side effects this has besides those alluded to in http://www.eclipse.org/eclipselink/api/2.4/org/eclipse/persistence/config/PersistenceUnitProperties.html#WEAVING_INTERNAL.

Best,
Laird
 
--
http://about.me/lairdnelson

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top