Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink with dynamically defined object model?
EclipseLink with dynamically defined object model? [message #1431903] Fri, 26 September 2014 10:03 Go to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 23
Registered: April 2012
Junior Member
Is it possible to use the ORM functionality in EclipseLink without having to use statically defined POJOs?

In my use case applications have an object model based on generic objects that should have all the metadata required by an ORM engine to do its work (but that is defined at runtime). I looked into Hibernate once and at that time my conclusion was that it was not possible/practical.

EDIT

So it seems this is exactly what I was looking for:

https://www.eclipse.org/eclipselink/api/2.4/org/eclipse/persistence/dynamic/DynamicHelper.html

https://wiki.eclipse.org/EclipseLink/Examples/JPA/Dynamic

https://wiki.eclipse.org/EclipseLink/Examples/Foundation/DynamicPersistence

Any shortcomings I should be aware of? For instance, can I have multiple independent dynamic schemas in a Java VM (multiple tenants, multiple applications)? Any ORM functionality that is available to static bindings for JPA that would not be available here?

Thanks!

Rafael

[Updated on: Fri, 26 September 2014 10:31]

Report message to a moderator

Re: EclipseLink with dynamically defined object model? [message #1440178 is a reply to message #1431903] Wed, 08 October 2014 03:09 Go to previous message
jason zhang is currently offline jason zhangFriend
Messages: 31
Registered: July 2009
Member
Hi, Rafael

If you are looking for using dynamic entity for you project, this project may be interesting to you: https://github.com/jasonzhang2022/flexims.

Definitely, there will be some learning and pitwall. But it SHOULD work.
With regards to your specific questions:
Any ORM functionality that is available to static bindings for JPA that would not be available here? Yes, ORM mapping is not 100% aligned with annotation. You will find some some xml elements in orm are ignored and needs some tweak.

can I have multiple independent dynamic schemas in a Java VM (multiple tenants, multiple applications)? Yes, you will several options to do this. You can definitely use multiple tenants. You can have multiple PU. You can merge all the schema into one PU during loading time.

-jason

Previous Topic:Using DTOs as Entities
Next Topic:Generate index for foreign keys in oracle
Goto Forum:
  


Current Time: Tue Mar 19 05:28:23 GMT 2024

Powered by FUDForum. Page generated in 0.01997 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top