Community
Participate
Working Groups
Created attachment 167501 [details] exception stack trace Given a java file with about 50 attributes in it, add the java entity to an orm.xml file. Select about 20 virtual attributes in the JPA Structure view, right-click and select 'Add Attribute to XML'. Sometimes an exception will occur (possibly multiple times), and the structure view will be corrupted with duplicate virtual attributes.
Created attachment 167777 [details] proposed patch against head The only real change in this patch is in GenericOrmPersistentType.updateVirtualAttributes() where I removed the code that attempts to keep virtual attributes in the same order as the java model they are built from. This was not deterministic code and was causing the index out of bounds exception. We decided this is unnecessary, especially since it wasn't working anyway. The rest of the changes are to tests that broke with this change. I have changed them such that they don't depend on the order of the attributes.
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. Our persistence outline can be corrupted while working with the orm.xml mapping file. * Is there a work-around? If so, why do you believe the work-around is insufficient? Workaround requires closing of the UI, but user would have to realize the corrupted state. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Manually tested by Karen and me. * Give a brief technical overview. Who has reviewed this fix? See comment 1. I have reviewed the fix. * What is the risk associated with this fix? Low risk. Change is isolated, and is very small. 99% of the patch is unit test related.
checked in for RC1
verified could not reproduce bug in RC1