| Summary: | jpa validation failure with callback | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Sherry Hill <sherry.hill> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | mitesh.meswani | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Sherry Hill
This issue exists because the initialization code was not updated to support initializing the hasAnyEventListeners when validation listeners were added. Subsequent changes to initialize the DescriptorEventManager reset the bootstrap setting of this flag. The easiest workaround is to add an entity listener to the Entity being validated. Another workaround is to manually cause the flag within the DescriptorEventManager for the validated descriptor to be set on. Do this by adding a 'dummy' Listener then removing it. DescriptorEventAdapter dummyListener = new DescriptorEventAdapter(); DescriptorEventManager eventManager = em.unwrap(Session.class).getDescriptor(Employee.class).getDescriptorEventManager(); eventManager.addListener(dummyListener); eventManager.removeListener(dummyListener); Created attachment 166672 [details]
Patch
Adds code that checks for Internal Listeners during initialization.
Patch checked in, Reviewed by Mitesh Meswani, verified using existing tests The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |