Skip Headers

Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g Release 3 (10.1.3) B14428-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Configuring a Serialized Object Mapping

Use a serialized object mapping to specify that a persistent property should be persisted as a serialized stream of bytes.

You define a serialized object at one of the property (getter or setter method) or field level of your entity.

For more information, see:

- "Understanding Direct-to-Field Mapping" in the Oracle TopLink Developer's Guide

- "Using a Converter Mapping" in the Oracle TopLink Developer's Guide

- "Serialized Object Converter" in the Oracle TopLink Developer's Guide

## Using Annotations

Example 7-15 shows how to use the `@Serialized` annotation to specify a serialized object mapping for field `picture`.

Example 7-15 @Serialized

    @Serialized(fetch=EAGER)
    @Column(name="PICTURE")
    public Byte[] getPicture()
    {
        return picture;
    }