ObjectDB Database Search

1-50 of 156 results

JPA Persistable Types

. Mapped superclasses In JPA, classes that are declared as mapped superclasses have some of the features ... these restrictions, so it treats mapped superclasses as ordinary entity classes. Mapped superclasses are useful ... supports all JPA persistable types, which include: User-defined classes: Entity classes, mapped

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 ... superclasses . When an entity is stored in the database, each persistent field must contain either null or

JPA Metamodel Types

defining the high-level classification of a type: BASIC , ENTITY , EMBEDDABLE , or MAPPED _ SUPERCLASS ... , mapped superclasses , and embeddables, representing any type that manages attributes. A managed type with a persistent identity (primary key), serving as the superinterface of entities and mapped

JPA Lifecycle Events

annotation. By default, callback methods in a superclass are also invoked for entities of its subclasses ... only in a mapping XML file, such as orm.xml ; there is no equivalent annotation: This mapping file ... on superclasses (from the top of the inheritance hierarchy down), and finally, listeners on the entity class

jakarta.persistence.PersistenceConfiguration.properties(Map)

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceConfiguration PersistenceConfiguration properties (    Map properties ) Set multiple properties of this persistence unit. Parameters: properties - the properties Returns: this configuration. Since: Jakarta Persistence (JPA) 1.0

JPA Metamodel Attributes

and superclasses ). Metamodel Attributes Hierarchy in Jakarta Persistence (JPA) 3. Base attribute definitions ... : COLLECTION , SET , LIST , or MAP . Represents an attribute typed as a generic java.util.Collection ... access. Represents an attribute typed as a java.util. Map , managing both keys and values

JPA Named Queries Annotations

). It is defined on an entity or mapped superclass and assigned a unique name for retrieval

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open ... .close(); emf.close(); } Entities: @Entity @Access(AccessType.FIELD) public class SuperClass { public SuperClass () { } } ChildClassA: @Entity @Access(AccessType.FIELD) public class ChildClassA extends

jakarta.persistence.MappedSuperclass

are inherited by the entities which extend it. A mapped superclass is not a persistent type, and is not mapped to a database table. The persistent fields and properties of a mapped superclass are declared ... are interpreted in the context of each entity class which inherits the mapped superclass

jakarta.persistence.EntityGraph

( Attribute attribute ) Add a node to the graph that corresponds to a map key that is a managed type ... a node to the graph that corresponds to a map key that is a managed type with inheritance ... subgraphs will automatically include the specified attributes of superclass subgraphs Inherited from Graph

jakarta.persistence.Convert

of an embedded type or inherited mapped superclass . It is not necessary to use the Basic annotation (or ... in the map , or an entity class which extends a mapped superclass , to enable or override conversion ... conversion mappings for attributes inherited from a mapped superclass @Entity @Converts({ @Convert

jakarta.persistence.Graph

Subgraph addKeySubgraph ( Attribute attribute ) Add a node to the graph that corresponds to a map key ... a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows ... will automatically include the specified attributes of superclass subgraphs Parameters: attribute

Query over the keySet of a map field with collection parameter

It is possible to execute a query over a keySet of a map field with comparing to a collection ... " + EntityParent.class.getName() + " e " + "WHERE e. map member of ?1"; TypedQuery q = em.createQuery(query ... ; } @OneToMany (cascade = CascadeType.ALL) public Map map = new HashMap (); } @Entity public static class

Extended mapping-definitions

The described feature is not available in any object-db I know, but possible with mapping ... (respectively its class) gets mapped to a java class. So cats get mapped to the java class 'Cat', dogs to 'Dog ... - mapping , containing dogs and cats mixed up. Querying would not be as performant as with storing

mapping file is not being loaded

, the Metamodel is empty - none of the entities referenced in the mapping file are present in the Metamodel ... ;          The entities are mapped in the ORM.xml file correctly, as ... guidelines call for the xml mapping files only, and this is an important requirement. ObjectDB

Index on map key

Is there a way to create an Index with @Index on the key of a map ? wua Andreas Wurm Indexes on map keys as well as queries on map keys are currently not supported. But as a workaround you can use a collection of embedded objects, as demonstrated below: package test; import java.util.*; import

Problem with queries on lists with reverse mapping

Hi, In version 2.4.2, when an object in a list is reversed mapped to the owning object, queries are returning objects of types that were not specified in the query. In the attached example the last test fails because the query returns both TeamA and TeamB objects where only TeamA was specified in

JPA Attributes Annotations

, relationship types, and data storage formats. General field mapping Configure standard state mapping behavior ... ;Identity and versioning  mapping Annotations used to define primary keys and concurrency control ... to perform optimistic locking checks. Enum mapping Configure how Java enumerated types are persisted and used

jakarta.persistence.NamedAttributeNode

-specific attributes. Superclass subgraph entries will be merged into subclass subgraphs. The value ... ) If the attribute references a Map type, this element can be used to specify a subgraph for the Key in the case of an Entity key type. A keySubgraph can not be specified without the Map attribute

jakarta.persistence.EntityListeners

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.EntityListeners Implemented Interfaces: Annotation Target: Type Specifies the callback listener classes to be used for an entity or mapped superclass . This annotation may be applied to an entity class or mapped superclass . The specified

jakarta.persistence.EmbeddedId

of an entity class or mapped superclass is the composite primary key of the entity. The type of the annotated ... with equality of the mapped primary key of the database table. The AttributeOverride annotation may be used to override the column mappings declared within the embeddable class. The MapsId annotation

jakarta.persistence.ExcludeSuperclassListeners

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.ExcludeSuperclassListeners Implemented Interfaces: Annotation Target: Type Specifies that the invocation of superclass listeners is to be excluded for the entity class (or mapped superclass ) and its subclasses. Since: Jakarta

jakarta.persistence.metamodel.IdentifiableType.getSupertype()

Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType IdentifiableType getSupertype() Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass . Returns: supertype of identifiable type or

jakarta.persistence.PostPersist

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.PostPersist Implemented Interfaces: Annotation Target: Method Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass , or a callback listener

jakarta.persistence.PostLoad

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.PostLoad Implemented Interfaces: Annotation Target: Method Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass , or a callback listener

jakarta.persistence.GeneratedValue

. The GeneratedValue annotation may be applied to a primary key property or field of an entity or mapped superclass in conjunction with the Id annotation. The persistence provider is only required

jakarta.persistence.NamedNativeQueries

to the persistence unit. The NamedNativeQueries annotation can be applied to an entity or mapped superclass . See Also: NamedNativeQuery Since: Jakarta Persistence (JPA) 1.0 Annotation Elements

jakarta.persistence.ExcludeDefaultListeners

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.ExcludeDefaultListeners Implemented Interfaces: Annotation Target: Type Specifies that the invocation of default listeners is to be excluded for the entity class (or mapped superclass ) and its subclasses. Since: Jakarta Persistence (JPA

jakarta.persistence.AttributeOverride.column

Jakarta Persistence (JPA) Method in jakarta.persistence.AttributeOverride Column column (Required) The column that is being mapped to the persistent attribute. The mapping type will remain the same as is defined in the embeddable class or mapped superclass . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.MapKeyJoinColumn

Interfaces: Annotation Target: Method, Field Specifies a mapping to an entity that is a map key. The map ... to represent the map . If no MapKeyJoinColumn annotation is specified, a single join column is assumed ... ") Map organization; } Example 2: @Entity public class VideoStore { @Id int id; String name; Address

jakarta.persistence.MapKeyColumn

: Annotation Target: Method, Field Specifies the mapping for the key column of a map whose map key ... = "IMAGE_FILENAME") @CollectionTable(name = "IMAGE_ MAPPING ") Map images; // map from image name ... ) The name of the map key column. The table in which it is found depends upon the context. If the map key

Setting and Tuning of JPA Queries

: For an EntityManagerFactory , use the createEntityManagerFactory method: Map properties = new HashMap(); properties ... . createEntityManagerFactory ("pu", properties); For an EntityManager , use the createEntityManager method: Map

Storing JPA Entities

XML element in the XML mapping file: The mapping file must be in the default location, META-INF/orm

jakarta.persistence.metamodel.Metamodel.managedType(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.Metamodel ManagedType managedType (    Class cls ) Return the metamodel managed type representing the entity, mapped superclass , or embeddable class. Parameters: cls - the type of the represented managed class Returns

jakarta.persistence.metamodel.IdentifiableType.getDeclaredVersion(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType SingularAttribute getDeclaredVersion (    Class type ) Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass . Parameters: type - the type

jakarta.persistence.metamodel.IdentifiableType.getId(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType SingularAttribute getId (    Class type ) Return the attribute that corresponds to the id attribute of the entity or mapped superclass . Parameters: type - the type of the represented id attribute Returns

jakarta.persistence.metamodel.IdentifiableType.getDeclaredId(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType SingularAttribute getDeclaredId (    Class type ) Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass . Parameters: type - the type of the represented

jakarta.persistence.metamodel.IdentifiableType.getVersion(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType SingularAttribute getVersion (    Class type ) Return the attribute that corresponds to the version attribute of the entity or mapped superclass . Parameters: type - the type of the represented version

jakarta.persistence.EntityManagerFactory

the application, and which must be colocated in their mapping to a single database. If two entity types ... mapping information, and information about stored procedure parameters. When the query is executed ... createEntityManager ( Map map ) Create a new application-managed EntityManager with the given Map

jakarta.persistence.JoinColumn

() { return address; } Example: unidirectional one-to-many association using a foreign key mapping // In ... . If the join is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy, the foreign key ... OneToMany mapping using a foreign key mapping strategy, the foreign key is in the table of the target

jakarta.persistence.Entity

interface may not be designated as an entity. An entity has a primary table, mapped using the Table annotation, and may have one or more secondary tables, mapped using the SecondaryTable annotation ... type maps to a single column in one of the tables mapped by the entity, a field of property

jakarta.persistence.EntityManager

of their occurrence in the select list and default JDBC type mappings are applied. Parameters: sqlString - a native ... query. Parameters: resultSetMapping - the name of the result set mapping sqlString - a native SQL query ... procedure are to be mapped procedureName - name of the stored procedure in the database Returns

SELECT clause (JPQL / Criteria API)

only single-valued path expressions in the SELECT clause. Collection and map fields cannot be included

Index Definition

is an ordered map data structure that ObjectDB maintains in the file system, not in memory. The B

jakarta.persistence.MapKey

: Annotation Target: Method, Field Specifies the map key for associations of type 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.MapKeyClass

: Annotation Target: Method, Field Specifies the type of the map key for associations of type Map . The map key can be a basic type, an embeddable class, or an entity. If the map is specified using Java ... id; ... @ElementCollection(targetClass = String.class) @MapKeyClass(String.class) Map images

Eager load Map

I'm having an issue eager loading a nested map . I've attached @ManyToMany(fetch=FetchType.EAGER) attributes to no avail. If the map is viewed in the debugger or force iterated in the code it loads ... it to a db and re-loads it. The EntityManager is closed before accesing any fields. Finally the nested map

Eager Fetch of Map with Entities as Keys

Loading eagerly a map that uses entity objects as keys is currently unsupported, if the equals ... is unavailable during instantiation of the map . The following test case demonstrates the problem ... .persist(key);         entity. map .put(key, "value");   

jakarta.persistence.MapKeyEnumerated

Interfaces: Annotation Target: Method, Field Specifies the enum type for a map key whose basic type ... relationship of type Map , in conjunction with the ElementCollection , OneToMany , or ManyToMany annotation ... Map getEmployees() { ... } ... } See Also: ElementCollection OneToMany ManyToMany Since: Jakarta

jakarta.persistence.MapKeyTemporal

Interfaces: Annotation Target: Method, Field This annotation must be specified for persistent map keys of type Date and Calendar . It may only be specified for map keys of these types. The MapKeyTemporal annotation can be applied to an element collection or relationship of type Map in conjunction