ObjectDB ObjectDB

Internal Website Search

1-10 of 179 resultsRefresh

Annotate a Map field with @ElementCollection or @Basic

with @ElementCollection, in the other case with @Basic. Is @Basic also a valid annotation for a Map field? And when it is valid why @Basic is faster at runtime. @Entity public class TestEntity { @ElementCollection private Map<Integer, String> values = new HashMap<>(); @Basic private

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY ... ; @Basic(fetch = FetchType.LAZY) private String description; @Basic(fetch = FetchType.LAZY ... always loads basic fields eagerly, regardless of the LAZY / EAGER setting. If you have very large

@Lob @Basic(fetch = FetchType.LAZY) is loaded when it's not needed

Hello. I have a class Thing that contains OneToMany list of classes Photo. Photo contains @Lob @Basic(fetch = FetchType.LAZY) private byte[] content; And after some queries with Thing ... always loads basic types eagerly. Consider replacing byte[] with a wrapper entity (e.g. Data


javax.persistence Annotation Basic Target: Fields (including property get methods) The simplest type of mapping to a database column. The Basic annotation can be applied to a persistent property or ... other type that implements java.io.Serializable. The use of the Basic annotation is optional for persistent


Enum Constant javax.persistence.metamodel.Type.PersistenceType BASIC Basic type Since: JPA 2.0


Enum Constant javax.persistence.metamodel.Attribute.PersistentAttributeType BASIC Basic attribute Since: JPA 2.0


Annotation Element javax.persistence.Basic boolean optional (Optional) Defines whether the value of the field or property may be null. This is a hint and is disregarded for primitive types; it may be used in schema generation. If not specified, defaults to true. Default value: true Since: JPA 1.0


Annotation Element javax.persistence.Basic FetchType fetch (Optional) Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the value must be eagerly fetched. The LAZY

JPA Annotations for Fields

Reference (JavaDoc) of JPA 2 field annotations, including @Basic, @Embedded, @EmbeddedId, @Version, @Transient, @Enumerated, @MapKeyEnumerated, @Temporal and @MapKeyTemporal.


Static Field javax.jdo.FetchGroup String BASIC For use with addCategory and removeCategory calls. This category includes members of all primitive and immutable object class types as defined in section 6.4 of the specification, including String, Locale, Currency, BigDecimal, and BigInteger; as

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support