Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Works as Designed
-
1.2.0.RELEASE
-
None
-
Ubuntu Linux; Maven Project
Description
With the Demo Project down below,
(default Parent/Child or Box/Items project)
you will face following two errors:
- You did set up some Items. As soon as you want to create a Box and chose some Items, Java Server Faces will oops with "invalid value" on saving.
Workaround: Override .equals() in Items-Clazz (see http://www.javapractices.com/topic/TopicAction.do?Id=17)
Is there a more sophisticated solution?
- As soon as you restart your Server (or start a new Session an other way), one cannot view the Items on a box.
Either Edit or View panel will fail lazy loading the Set<>.
In Hibernate this will cause a "Lazy loading error"
In OpenJPA this will cause a "Null Pointer Exception"
In Datanucleus ... did not compile; not able to test
and
In Eclipselink - IT WORKS!!! (can anyone tell my why?)
=== Source Code
project --topLevelPackage org.example.esm --projectName ElementSetMockup
persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT
entity jpa --class ~.Box
entity jpa --class ~.Item
field string --fieldName name --class ~.Item
field string --fieldName name --class ~.Box
field set --fieldName myItems --type ~.Item
web jsf setup
web jsf all --package ~.jsf
exit