Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] dynamic entity example code relationships with static entites?

I filed a bug to address the validation of mappings which occurs by default and breaks since the dynamic class does not exist:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=241659

The issue with default has been addressed in 1.0M8 with bug 211330 introducing <exclude-default-mappings/> which can be used in the EclipseLink-ORM.XML in either the persistence unit defaults or within any entity.

Doug

-----Original Message-----
From: DOUGLAS.CLARKE@xxxxxxxxxx 
Sent: Tuesday, July 22, 2008 4:54 AM
To: EclipseLink User Discussions
Subject: RE: [eclipselink-users] dynamic entity example code
relationships with static entites?


Lachan,

The original intent of the work-in-progress dynamic entity example was to illustrate how a JPA defined entity type could be dynamically created and used. The approach taken was intended to use completely standard JPA with a couple of custom hooks to allow for the dynamic creation of entities in such a way that if the classes were to exist the dynamic creation would just not occur. This would allow you to combine dynamic with static entities.

In the end I removed this example from the 1.0 release and will complete it more formally for a future release. The reason for this is that I still have an issue with the way JPA works with respect to dynamic models. The specification indicates that even when using XML metadata-complete the JPA provider should still check the entity class for default mappings. Since the dynamic case does not have concrete classes this phase fails. We need to add an additional EclipseLink specific flag that will ensure that the XML metadata is trusted completely and the class is not inspected at all during bootstrapping. Once this fix is in place we should have a completely standard usage of the JPA EntityManager and EntityManagerFactory.

Doug 

-----Original Message-----
From: Lachlan Gregor [mailto:lachlan.gregor@xxxxxxxxx]
Sent: Wednesday, July 16, 2008 1:03 AM
To: EclipseLink User Discussions
Subject: [eclipselink-users] dynamic entity example code relationships
with static entites?


Hi,


I was just wondering if anyone could shed some light on making use of  
the feature of dynamic entities however with relationships that map to  
standard static entities? From my understanding and some trial and  
error i have noticed that when using the dynamic entities a custom  
entityManager is required(as the dynamicEnitities do not use  
persistence.xml?), than when using standard entities and the two are  
not complementary?

Is there any thing that i may have overlooked?

I would like to have bi-directional relationships with the  
DynamicEntity superclass(which would spawn sub-classes) to other  
standard entities? however the DynamicEntity class is not an jee  
entity , thus requiring a special em, which makes creating  
relationships somewhat challenging?

any insight would be great, it feels like i might be missing something?

thanks,

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


Back to the top