how to mark something unstored

68 Views Asked by At

In the Siena is a persistence API for Java, how would one annotate that a field is not persisted??

See https://github.com/mandubian/siena/wiki/Manuals

1

There are 1 best solutions below

3
On

According to The docs.oracle.com Java Tutorial on Bean Persistence...

To exclude fields from serialization in a Serializable object mark the fields with the transient modifier.

transient int status;

Default serialization will not serialize transient and static fields.

... so I don't think you annotate that, but if you did I'd bet it was with the Transient annotation.