Community
Participate
Working Groups
Use the JPA details view to set Custom ordering on an orm.xml element collection mapping and you get a CCE
Created attachment 168576 [details] proposed patch against head This patch fixes the order-by translator for element collection mappings. Makes it the same as the translator for 1-m and m-m mappings.
Upping the severity. Once you have set the order-by element on the element collection directly in the source(<order-by>name</order-by>) if you rebuild the project or restart eclipse the orm.xml file won't load because of the exception. Then this actually prevents the JPA project from being built.
Created attachment 168599 [details] proposed patch against head This patch fixes the translator bug and also catches any exception when building JPA files, logs it and continues to the next JPA file instead of failing to build the JPA project.
Brian could you review this patch? Pretty simple, but just want to make sure this head cold isn't affecting my coding :)
(In reply to comment #4) The patch looks reasonable.
* 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. See comment 2. * Is there a work-around? If so, why do you believe the work-around is insufficient? No workaround. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Manual and unit tests run. * Give a brief technical overview. Who has reviewed this fix? Use the appropriate Translator and makes the building of JPA files more robust. * What is the risk associated with this fix? Low risk. Translator usage matches other similar usage.
Brian and I have reviewed the fix.
checked in to HEAD
I can't test the fix, since I can't actually set the element collection to use custom ordering using the details pane. When I attempt to set custom ordering, the <order-by></order-by> tags are added (not sure that's exactly the right tag, but something is happening) but the Primary key radio button is also selected and the custom ordering text field is still disabled. Did this fix also cause this problem?
I should have pointed to bug 190866 since that covers the remaining issue. This bug was purely to fix the CCE so you actually are testing the fix if you aren't seeing the CCE and if the use case in comment #2 works. The UI issues do appear to have gotten worse so we should probably make another attempt at fixing 190866 in the next release. I have not figured out how to get the translators to work for this case, Paul maybe you will have some luck with that? Or if it's not possible it's one reason for us to remove our use of translators.
Re-resolving as I now understand better the steps to reproduce.
verified no cce's in RC2