mybatis/mybatis-3 — pull request #59 by qlp (2013-06-10 10:28:17+00:00)
Title: Test to demonstrate circular serialization issues.

Deserialization of objects with mybatis proxies fails when having circular
references. Is is an extension of the test created for [googlecode issue 614](http://code.google.com/p/mybatis/issues/detail?id=614).

__This test uses three types:__
* Parent (with reference to a List of Children and Person)
* Child (with reference to Parent and Person)
* Person

__And executes the folowing scenario:__
1. A Parent is fetched using the ParentMapper
2. The getChildren() method is invoked on the loaded Parent.
3. Child is serialized
4. Child is deserialized

__Result:__
Caused by: java.lang.ClassCastException: cannot assign instance of org.apache.ibatis.executor.loader.cglib.CglibSerialStateHolder to field org.apache.ibatis.submitted.serializecircular.Child.parent of type org.apache.ibatis.submitted.serializecircular.Parent in instance of org.apache.ibatis.submitted.serializecircular.Child
at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(Unknown Source)
at java.io.ObjectStreamClass.setObjFieldValues(Unknown Source)