Close

JPA - Array of basic Java types mapping

Arrays of Java primitives, primitives wrapper and all other basic types can be mapped without any extra configurations. These Java types are persisted as database types VARBINARY except for char[] and Character[] which are persisted as VARCHAR . Any type which is serializable, including its array can be persisted.

Example Project

Dependencies and Technologies Used:

  • h2 1.4.193: H2 Database Engine.
  • eclipselink 2.6.4: EclipseLink build based upon Git transaction 44060b6.
    Related JPA version: org.eclipse.persistence:javax.persistence version 2.1.1
  • javax.persistence 2.1.1: javax.persistence build based upon git transaction 40384f5.
  • JDK 1.8
  • Maven 3.3.9

jpa-simple-array-mapping Select All Download
  • jpa-simple-array-mapping
    • src
      • main
        • java
          • com
            • logicbig
              • example
                • ExampleEntity.java
          • resources
            • META-INF

    See also

    JPA - Basic Persistable Types