Make GenRecordTask only honor @Transient, like DepotMarshaller.
We've chosen not to conflate Java transience with Depot non-persistence. It's a little wonky to have to choose a particular memory model behavior just to have a field not persisted in your record.
This commit is contained in:
@@ -118,7 +118,7 @@ public class DepotMarshaller<T extends PersistentRecord> implements QueryMarshal
|
||||
}
|
||||
}
|
||||
|
||||
// the field must be public, non-static and non-transient
|
||||
// the field must be public, non-static and non-@Transient
|
||||
if (!java.lang.reflect.Modifier.isPublic(mods) ||
|
||||
java.lang.reflect.Modifier.isStatic(mods) ||
|
||||
field.getAnnotation(Transient.class) != null) {
|
||||
|
||||
@@ -343,13 +343,13 @@ public class GenRecordTask extends Task
|
||||
|
||||
/**
|
||||
* Returns true if the supplied field is part of a persistent record (is a public, non-static,
|
||||
* non-transient field).
|
||||
* non-@Transient field).
|
||||
*/
|
||||
protected boolean isPersistentField (Field field)
|
||||
{
|
||||
int mods = field.getModifiers();
|
||||
return Modifier.isPublic(mods) && !Modifier.isStatic(mods) &&
|
||||
!Modifier.isTransient(mods) && !hasAnnotation(field, Transient.class);
|
||||
!hasAnnotation(field, Transient.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user