Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » AggregateCollectionMapping in DyanmicMapping(AggregateCollectionMapping does not work for DynamicMapping)
AggregateCollectionMapping in DyanmicMapping [message #918110] Thu, 20 September 2012 14:55 Go to next message
Eclipse UserFriend
I am using the Dynamic Map feature in eclipselink.
I noticed that JPADynamicTypeBuilder does not have a method to add
AggregateCollectionMapping method. AggregateCollectionMapping should
be the one for ElementCollection in JPA for embedded class.
I create and add AggregateCollectionMapping directly to JPADynamicTypeBuilder. Code is attached.
I can save embedded colleciton, and delete them together with owing instance. But I can not modify them(modify one element, remove one, or and one).

In my code, I first call create to create the mapping. I then call save. I check
logged sql and database structure. Embedded collection is saved
correctly. I then call removeOneName1 and removeOneName2 to remove one
embedded object by different approaches. But this removal is just ignored by EntityManager.

Any help is really appreciated.

-jason
  • Attachment: Test1.java
    (Size: 7.58KB, Downloaded 434 times)
Re: AggregateCollectionMapping in DyanmicMapping [message #918519 is a reply to message #918110] Fri, 21 September 2012 00:52 Go to previous messageGo to next message
Eclipse UserFriend
Bump!
Any help is really appreciated!
I have looked into various piece of the source code and can not figure out why this does not work.




thanks.
-jason
Re: AggregateCollectionMapping in DyanmicMapping [message #923035 is a reply to message #918519] Tue, 25 September 2012 10:50 Go to previous message
Eclipse UserFriend
Please log a bug for this issue and vote for it.

I believe the issue you are seeing is related to change tracking, which defaults to Attribute for dynamic, but Attribute is not support for aggregate collections.
You could try switching your descriptor to use deferred change tracking,


descriptor.setObjectChangePolicy(new DeferredChangeDetectionPolicy());
Previous Topic:query results cache for report queries?
Next Topic:Creating BLOBs
Goto Forum:
  


Current Time: Tue Jul 08 23:26:25 EDT 2025

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

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

Back to the top