Community
Participate
Working Groups
Build Identifier: I20101028-1441 Both radio buttons of Default and Converted are selected once switching from Temporal to Converted, and selecting back to Temporal leads to Default being selected. This only happens with ORM convert. Reproducible: Always Steps to Reproduce: 1. Select an convertible mapping in the mapping file editor 2. In JPA detail view, select Type -> Temporal and then select Converted 3. Select back to Temporal
The reason of this bug ends up the timing issue of multiple events. The solution could be changing the design of UI or the way to handle the concurrent events. And we need to handle the error state when multiple converters are set at the same time. Considering all these, the changes would be too big to be included in release 3.0. Bug 344179 may end up with the same concern.
Given that the use case isn't a particularly common one and due to Nan's last comment, this is being deferred to 3.1.
Moving JPA specific bugs to new JPA component in bugzilla.
Created attachment 215422 [details] proposed patch Th fix looks a little bit awkward and hacky, but seems the best solution at this point. Users may still get UI out of sync issue if they quickly switch back and forth between different converter options which I think it's very rare.
I assume we would be looking at a different fix for 3.1 than the proposed patch? This appears to be a case were we may need a batch style operation to ensure an orderly update.
Karen - I assume this is a case where we need to apply "batch model change" technique to ensure orderly change in the model. Can you confirm and help Nan with the application of this technique?
I actually think the proposed patch is reasonable. I don't think setting the converter from the JPA details view via a Job with synchronous updates (I think that's what you mean by "batch model change") would help, if anything it would cause the problem every time. My only comments are to do the same thing for the places where we have a mapKeyConverter (Element Collection and Multi-Relationship mapping I think are the only places). Also you could change buildNullConverter() to lazily initialize a instance of OrmConverter instead of having to build a new instance of NullOrmConverter every time the converter is changed.
Created attachment 221178 [details] proposed patch - incorporated the previous comments - cleaned the code of ORM enumerated converter and Eclipselink ORM convert - handled the default value of different types of converters with similar way PS: this patch also fixed bug 336005.
The patch is based on the following commit: 0ad90a3 dump stack trace when JPA project manager is started to aid in debugging Brian Vosburgh
Nan, things are looking pretty good, just a few suggestions: 1. If you could get rid of the buildNullConverter() methods and use the nullConverter attribute in all the places that call buildNullConverter(). 2. You changed EclipseLinkConvertCombo, but this affects the Java UI as well where the Default(none) is a valid option
Created attachment 221206 [details] proposed patch - removed buildNullConverter() methods - added the Default(none) option back This patch is based on the following commit: 387e840 [338725] - @Basic should not be added to attributes Petya Sabeva
committed to master with commit: http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=f01bfd98943d26f4cd785cfb8a9a24337980a649
Verified in build I-3.5.0-20121113030454 that the UI updates correctly when you switch from Temporal to Converted to Temporal and all radio buttons within the Type section in JPA details tab. To view steps to verify this issue go to http://wiki.eclipse.org/Dali_3.3_M2_Release