Add serialization unit tests #60

Open
tandraschko opened this Issue Oct 31, 2012 · 5 comments

Projects

None yet

3 participants

@tandraschko

Common tasks for JSF apps is that entities will be serialized and deserialized.
After deserialization, the following stuff (and maybe more) must work:

entity.isTransient()
entityManager.contains(entity)
entityManager.merge(entity)

@tandraschko

We should also do this with complex entities with Lists, @IdClass, Embedded and else.

@asimarslan asimarslan was assigned Mar 12, 2013
@asimarslan
Member

This issue will cover serialization.

It should cover class loading of an enhanced class ???

@asimarslan
Member

provided by @ylemoigne

Caused by: java.lang.ClassNotFoundException: thepackage.TheEntity$Enhanced
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:892)

@ylemoigne
Contributor

Yeah thanks, I'll try provide you a test model tomorrow with different mapping, some enum, some temporal field, some basic field, mixed with abstract classes, MappedSuperclass and transient things.

@asimarslan
Member

An initial unit test base just work. I will keep this open for possible additions.

Thanks @ylemoigne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment