ObjectDB Database Search

1-50 of 118 results

JPA Entity Fields

The fields of persistable user-defined classes (entity classes, embeddable classes, and mapped superclasses) can be classified into the following five groups: Transient fields Persistent fields Inverse ( mappedBy ) fields Primary key (ID) fields Version field The first three groups (transient

Problem persisting a TreeSet field

Hello, I am getting a "java.lang.IllegalArgumentException: Can not set java.util.TreeSet field ...   lorenz2304 Benjamin Lorenz Your definition of field children is invalid in JPA - Only collection interface types ( Collection , Set , List , Map ) should be used in persistent field definition

Double persist of Entity field with Cascade.ALL

I am building a JavaEE application using Netbeans 7.0.1, Glassfish 3.1 and ObjectDB 2.3.3. I have a Book class with entity field Chapter which has a CascadeType.ALL property. The Book fields are as ... fields are as follows: @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private

JPA inheritance issue with ObjectDB - Field not found in type error

; // other fields , getters, and setters } @Entity @Inheritance public class PharmaceuticalItem extends Item ... this query, I get the following error: Error executing query: Field 'retired' is not found in type 'com

Multiple Collection Fields not update correctly

  v2.8.8_2 I have an entity that has 2 collection fields : @OneToMany(fetch = FetchType.EAGER)      Collection position;      @OneToMany(fetch = FetchType.EAGER ... can only have 1 field that is a Collection .   position has values 8.0f, 8.0, 8.0 rotation has values 8.0f

java.sql.Time field off by 30 minutes

Hihi, I'm wondering if this is a bug. I have a simple entity with java.sql.Time field . On writing and readback, the field is found to be 30 minutes off. It is observed on objectdb explorer as well. Timestamp works perfectly fine. Ps. dont think its a UTC issue. My system is set at far off UTC

Storing JPA Entities

fields is also stored. You can do this either by explicitly persisting every reachable object or by setting up automatic cascading persist operations. Cascading persist Marking a reference field ... operations are automatically cascaded to entities that are referenced by that field . A collection field

Database Management Settings

locking is fully automatic and enabled by default in ObjectDB, regardless of whether a version field is defined in the entity class. Some ORM JPA providers require a version field . You can disable

SELECT clause (JPQL / Criteria API)

projection. Projection extracts field values from entities to form the query results. The results ... only single-valued path expressions in the SELECT clause. Collection and map fields cannot be included

jakarta.persistence.Entity

. An entity class holds state, represented as persistent fields and properties: a field or property of basic type maps to a single column in one of the tables mapped by the entity, a field of property ... class must have at least one field or property annotated Id or EmbeddedId holding the primary key

jakarta.persistence.IdClass

: Annotation Target: Type Specifies a composite primary key type whose fields or properties map to the identifier fields or properties of the annotated entity class. The specified primary key type ... fields of the entity must be annotated Id , and the specified primary key type must have fields or

jakarta.persistence.Convert

: Annotation Target: Method, Field , Type Specifies how the values of a field or property are converted ... defined autoApply=true , or overriding the use of a converter specified by a field or property ... field or property. The dot notation may also be used with map entries: When this annotation

jakarta.persistence.MappedSuperclass

mapped to a database table. The persistent fields and properties of a mapped superclass are declared ... is FTEMPLOYEE table @Entity public class FTEmployee extends Employee { // Inherited empId field mapped to FTEMPLOYEE.EMPID // Inherited version field mapped to FTEMPLOYEE.VERSION // Inherited address field

NullPointer when accessing persistent field

NullPointer when accessing persistent field

jakarta.persistence.ManyToOne

: Annotation Target: Method, Field Specifies a single-valued association to another entity class ... the relationship field or property of the entity that is the owner of the relationship. A ManyToOne ... to specify the relationship field or property of the embeddable field or property on the owning

jakarta.persistence.Enumerated

: Annotation Target: Method, Field Specifies that a persistent property or field should be persisted as an enumerated type. This annotation is optional if the type of a persistent field or property ... the available options. The mapping may be explicitly specified by this annotation. If a persistent field or

jakarta.persistence.ManyToMany

: Annotation Target: Method, Field Specifies a many-valued association with many-to-many multiplicity ... the relationship field or property of the owning side. The join table for the relationship, if not defaulted ... the mappedBy element of the ManyToMany annotation to specify the relationship field or property

jakarta.persistence.Embeddable

of multiple persistent fields or properties, across several entities, and so distinct instances ... in the table or tables mapped by the owning entity. The persistent fields and properties ... its owning entity to another entity. However, an embeddable class may not have a field or property

jakarta.persistence.EmbeddedId

: Annotation Target: Method, Field Specifies that the annotated persistent field or property ... field or property must be an embeddable type, and must be explicitly annotated Embeddable . If a field or property of an entity class is annotated EmbeddedId , then no other field or property

jakarta.persistence.EnumType

how a persistent property or field whose type is a Java enum type should be persisted. See Also: Enumerated ... how to use EnumType . Enum Constants ORDINAL Persist enumerated type property or field as an integer. The ordinal value of an enum instance with no EnumeratedValue field is the value of its Enum#ordinal

jakarta.persistence.JoinColumn

: Annotation Target: Method, Field Specifies a column for joining an entity association or element ... is used): The concatenation of the following: the name of the referencing relationship property or field ... . If there is no such referencing relationship property or field in the entity, or if the join

jakarta.persistence.MapKey

: Annotation Target: Method, Field Specifies the map key for associations of type java.util.Map when the map key is itself the primary key or a persistent field or property of the entity that is the value of the map. If a persistent field or property other than the primary key is used as a map key

jakarta.persistence.EnumeratedValue

Interfaces: Annotation Target: Field Specifies that an annotated field of a Java enum type is the source of database column values for an enumerated mapping. The annotated field must be declared final ... . The annotated field must not be null, and must hold a distinct value for each value of the enum type

jakarta.persistence.Id

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Id Implemented Interfaces: Annotation Target: Method, Field Identifies the primary key of an entity. The field or property ... is assumed to be the name of the primary key property or field . Example: @Id public Long getId

jakarta.persistence.Lob

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Lob Implemented Interfaces: Annotation Target: Method, Field Specifies that the annotated persistent property or field ... ) is inferred from the type of the persistent field or property. For string and character-based types

jakarta.persistence.MapKeyColumn

: Annotation Target: Method, Field Specifies the mapping for the key column of a map whose map key ... of the following: the name of the referencing relationship field or property; " _ "; " KEY ". Example: @Entity ... relationship field or property; " _ "; " KEY ". Default: "" Since: Jakarta Persistence (JPA) 1.0 boolean

jakarta.persistence.MapKeyJoinColumn

Interfaces: Annotation Target: Method, Field Specifies a mapping to an entity that is a map key. The map ... of the referencing relationship property or field of the referencing entity or embeddable class ... annotation at the table level and is useful for when the unique key constraint is only a single field

jakarta.persistence.FieldResult

the SELECT list of a SQL query to the properties or fields of an entity class. Example: Query q = em ... .Order.class, fields = { @FieldResult(name = "id", column = "order_id"), @FieldResult(name = "quantity ... Name of the persistent field or property of the class. Since: Jakarta Persistence (JPA) 1.0 String

jakarta.persistence.GeneratedValue

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.GeneratedValue Implemented Interfaces: Annotation Target: Method, Field Specifies a generation strategy for generated primary keys. The GeneratedValue annotation may be applied to a primary key property or field of an entity or mapped

jakarta.persistence.JoinTable

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.JoinTable Implemented Interfaces: Annotation Target: Method, Field Specifies the mapping of an association to an intermediate join table ... ", referencedColumnName = "ID")) This annotation may not be applied to a persistent field or property not annotated

jakarta.persistence.InheritanceType

, with only the columns mapped to persistent fields and properties declared by the entity class. Each ... to inherited fields or properties, and so the state of an entity instance might be stored across multiple table

jakarta.persistence.Embedded

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Embedded Implemented Interfaces: Annotation Target: Method, Field Declares a persistent field or property of an entity whose value is an instance of an embeddable class. The embeddable class must be annotated as Embeddable

jakarta.persistence.ElementCollection

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.ElementCollection Implemented Interfaces: Annotation Target: Method, Field Declares a collection of instances of a basic type or ... of the collection. This element is optional only if the collection field or property is defined using Java

jakarta.persistence.EntityResult

[] fields Maps the columns specified in the SELECT list of the query to the properties or fields

[ODB1] Chapter 6 - Persistent Objects

that, at commit time, is reachable from a persistent object (using persistent fields ... it can be retrieved simply by navigating through the persistent fields ... whatever manner) all its persistent fields can be accessed freely. This includes fields that reference

jakarta.persistence.Persistence.PERSISTENCE_PROVIDER

Jakarta Persistence (JPA) Field in jakarta.persistence.Persistence PERSISTENCE_PROVIDER This final ... Deprecated: TODO: Either change TCK reference to PERSISTENCE_PROVIDER field to expect "jakarta.persistence.spi.PersistenceProvider" or remove PERSISTENCE_PROVIDER field and also update TCK signature tests. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.AttributeOverride.name

Jakarta Persistence (JPA) Method in jakarta.persistence.AttributeOverride String name (Required) The name of the property whose mapping is being overridden if property-based access is being used, or the name of the field if field -based access is used. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.JoinColumns

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.JoinColumns Implemented Interfaces: Annotation Target: Method, Field Specifies the mapping for composite foreign keys. This annotation groups JoinColumn annotations for the same relationship. Each JoinColumn annotation must explicit

jakarta.persistence.MapKeyClass

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.MapKeyClass Implemented Interfaces: Annotation Target: Method, Field Specifies the type of the map key for associations of type java.util.Map . The map key can be a basic type, an embeddable class, or an entity. If the map is specified

jakarta.persistence.MapKeyEnumerated

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.MapKeyEnumerated Implemented Interfaces: Annotation Target: Method, Field Specifies the enum type for a map key whose basic type is an enumerated type. The MapKeyEnumerated annotation can be applied to an element collection or

jakarta.persistence.MapKeyTemporal

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.MapKeyTemporal Implemented Interfaces: Annotation Target: Method, Field This annotation must be specified for persistent map keys of type java.util.Date and java.util.Calendar . It may only be specified for map keys of these types

jakarta.persistence.MapKeyJoinColumns

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.MapKeyJoinColumns Implemented Interfaces: Annotation Target: Method, Field Supports composite map keys that reference entities. The MapKeyJoinColumns annotation groups MapKeyJoinColumn annotations. When the MapKeyJoinColumns annotation

jakarta.persistence.MapsId

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.MapsId Implemented Interfaces: Annotation Target: Method, Field Designates a ManyToOne or OneToOne relationship attribute that provides the mapping for an EmbeddedId primary key, an attribute within an EmbeddedId primary key, or

jakarta.persistence.Converts

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Converts Implemented Interfaces: Annotation Target: Method, Field , Type Used to group Convert annotations. Multiple converters must not be applied to the same basic attribute. See Also: Convert Since: Jakarta Persistence (JPA) 2.1

jakarta.persistence.ColumnResult

= { @EntityResult( entityClass = com.acme.Order.class, fields = { @FieldResult(name = "id", column = "order_id

jakarta.persistence.EntityManager

to its persistent fields and properties are automatically detected, as long as it is associated with an active

Step 2: Entity Class and Persistence Unit

static final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private

Step 4: Add a Controller Class

. A GuestDao component is automatically constructed and injected by Spring into the guestDao field

Step 2: Define a JPA Entity Class

should represent Point objects in the database. Apart from the @Entity annotation and the id field

Step 2: Define a JPA Entity Class

objects in the database. Besides the @Entity annotation and the id field (and its annotations