Bug 233 : Make _ebean properties transient ... to support JSON serializer
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.5.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
05/03/2010
Updated 
05/03/2010
Type 
Bug
 
Attachments 
No attachments

A problem occurred when using a JSON serializer (gson) which fails to serialize any enhanced class due to circular referencing. if added _ebean properties are declared as transient many serializers would skip them.

 
Rob 06 Mar 03:47
transientInternalFields=true ... as parameter to the enhancement process

Note that we are not changing the default access for the intercept field.

You have to pass transientInternalFields=true as a parameter to the enhancement for the access to change to be transient.

Rob 06 Mar 03:50
Fixed in HEAD

Note the "transientInternalFields=true" ... parameter for the enhancement ant target.

<taskdef name="ebeanEnhance" classname="com.avaje.ebean.enhance.ant.AntEnhanceTask">
                <classpath>
                        <dirset dir="${task.bin.dir}"></dirset>
                </classpath>
        </taskdef>

        
        <!-- on the bin for running in the IDE. Using Eclipse IDE Enhancement another option -->
        <target name="bin-ormEnhance">
                <ebeanEnhance classSource="${bin.dir}" packages="**" transformArgs="debug=9;transientInternalFields=true"/>
        </target>

woResponse

Upload a file