3.8.7.3. Multi-Column Mappings

OpenJPA makes it easy to create multi-column custom mappings. The JPA specification includes a Column annotation, but is missing a way to declare multiple columns for a single field. OpenJPA remedies this with the org.apache.openjpa.persistence.jdbc.Columns annotation, which contains an array of Column values.

Remember to annotate custom field types with Persistent, as described in Persistent Field Values.