| Extensible Entities [message #735305] |
Tue, 11 October 2011 09:54  |
John Dugo Messages: 12 Registered: October 2011 |
Junior Member |
|
|
My application has a requirement to support dynamic (flex) fields on our Entity Objects. I was hoping that the extensible entity support added in v2.3 could handle this.
This application has entity objects that are purely annotation based. All of the extensible entity code samples I can find have EOs whose attributes are xml based. I attempted to extend my entities using a eclipselink-orm.xml (tried including in my war and loading via a Metadata repository) but continue to get exceptions on startup.
Does the extensible entity stuff support annotation based entities? If not, is there another way to support dynamic fields?
Thanks,
John
|
|
|
|
|
|
|
|
| Re: Extensible Entities [message #735422 is a reply to message #735418] |
Tue, 11 October 2011 14:33   |
John Dugo Messages: 12 Registered: October 2011 |
Junior Member |
|
|
something is wrong here:
for the get/set methods its calling into this:
getAccessibleMethod(MappingAccessor accessor)
Which is looking for a get() method with no args. When it calls to find the set method it throws an NPE, since the get method doesn't exist.
I'm assuming it should be calling into this method instead:
protected MetadataMethod getAccessibleVirtualMethod(MappingAccessor accessor)
[Updated on: Tue, 11 October 2011 14:34] Report message to a moderator
|
|
|
| Re: Extensible Entities [message #735429 is a reply to message #735422] |
Tue, 11 October 2011 14:54  |
John Dugo Messages: 12 Registered: October 2011 |
Junior Member |
|
|
Ok i got it working. I would recommend adding this to the documentation:
<basic name="calendarId" attribute-type="Integer" access="VIRTUAL">
Without that, if your entity is property or field based, adding virtual methods won't work (atleast in my case
|
|
|
| Re: Extensible Entities [message #735434 is a reply to message #735422] |
Tue, 11 October 2011 14:54  |
John Messages: 52 Registered: July 2009 |
Member |
|
|
Ok i got it working. I would recommend adding this to the documentation:
<basic name="calendarId" attribute-type="Integer" access="VIRTUAL">
Without that, if your entity is property or field based, adding virtual methods won't work (atleast in my case
|
|
|
Powered by
FUDForum. Page generated in 0.02054 seconds