Serialized Object Mapping

The serialized object mapping can be used if a whole java object should be stored to a single column in the database. The object will be serialized with help of the standard java serialization mechanism.

The following class Person is going to be persistent using a serialized object mapping for the Address (note that Address is not persistence-capable):

public class Person
{
  private Address addr;
}
In the JDO file the following settings must be made:
  . . .
  <field name="addr" persistence-modifier="persistent">
    <extension vendor-name="ssibo" key="jdbc">
      <extension vendor-name="ssibo" key="mapping" value="serial">
        <extension vendor-name="ssibo" key="field-name" value="FADDR" />
      </extension>
    </extension>
  </field>
  . . .
The Address object has no identity itself and is stored as part of the Person object. The database column should be a BLOB type.