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.
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.
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>