ObjectDB Database Search

101-150 of 200 results

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 ... and 2 .) not all classes are known at project start (an editor). To deal with especially the 2

Merge of entity classes with "mapped by" very slow

Hi, I have found a strange behavior when merging entities with " mapped by" set on @OneToMany ... - one with mapped by, second with adding entities list without " mapped by". The difference is huge event for such small objects - 2ms (without mapped by) vs ~50ms (with mapped by) Is there any chance

Why are my Map entries not stored?

Why are my values of the map "states" not stored in the database? It seems the 'State' is stored ... ) @MapKeyEnumerated(EnumType.STRING)     private Map states = new HashMap (); } @Entity ... (EnumType.STRING) private Map states = new HashMap (); Is this correct now? "mappedBy" is not required

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

Eager Fetch is not stable for collection or map types?

map types is not stable, we lost them sometimes after JVM restarted. Eager fetch is properly set ... is we confirm that the collection or map are stored successfully by using explorer tools when the JVM ... () of collection or map before closing the EntityManager, data can be retrieved successfully: 

a second mapping-file is ignored in persistence.xml by enhancer

Hello Support-Team, we have a problem with the enhancer. In the persistence.xml are two mapping ... will be enhanced by following output: enhancer: [java] [ObjectDB 2 .6.0_02 Enhancer] [java] 3 persistable ... : enhancer: [java] [ObjectDB 2 .6.0_02 Enhancer] [java] 11 NON persistable types have been enhanced: [java

Mapped By Fetch is very Slow

Well ! I think i pointed out a HUGE performance issue with mapped -by attribute (yeah ... attribute) 2 - Retrieve only 10 000 for testing 3- Wait ... On my AMD FX 8350, it took 60s Now, go the MyEntity class and remove " mapped -by". You obtain 1 second max of query fetch. So my performance

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 ... you for this report. This is fixed in build 2 .4.3_01. support Support

Exception when querying Map property with @embedded & Enhancer enabled

; Exception in thread "main" [ObjectDB 2 .6.4_03] javax.persistence.PersistenceException Failed to write ... build 2 .6.4_06 that should fix this issue. support Support

JPA Lifecycle Events

only in a mapping XML file, such as orm.xml ; there is no equivalent annotation: This mapping file

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

JPA Metamodel Attributes

: 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

What is the Java Persistence API (JPA)?

. These implementations are Object Relational Mapping (ORM) tools. The mapping  bridges between the data

JPA Metamodel and Graphs

, mapped superclasses, and embeddables. Describes the hierarchy of attributes (persistent fields and properties), covering singular, plural (collection), and map attributes. For detailed examples

Database Schema Evolution

to any collection or array that can contain that object as an element. From any map type to any other map type, as long as the keys and values are convertible (for example, from HashMap to TreeMap ). Any

Paths and Types in JPQL and Criteria API

Instances of user-defined persistent classes (entity classes, mapped superclasses, and embeddable classes) are represented in JPQL by the following types of expressions: Variables : FROM ... to collections, maps , or values of simple types (such as numbers, booleans, strings, and dates). For a path

JPA Listeners & Callbacks Annotations

a listener class. Listeners configuration Entity Entities and mapped superclasses ... listener classes for the entity or mapped superclass. These listeners respond to lifecycle events

Eager load Map

Richard Szurgot There was a bug in eager fetch of collections and maps of simple values. Build 2 .3. 2 ... map is empty so nothing is printed to the console. If you uncomment the 2 lines after the "find ... I'm having an issue eager loading a nested map . I've attached @ManyToMany(fetch=FetchType.EAGER

jakarta.persistence.ManyToMany

, mapping to an intermediate table called the join table . Every many-to-many association ... , is specified on the owning side. The JoinTable annotation specifies a mapping to a database table ... 2 : // In Customer class: @ManyToMany(targetEntity = com.acme.PhoneNumber.class) public Set

jakarta.persistence.ManyToOne

association usually maps a foreign key column or columns. This mapping may be specified using the JoinColumn annotation. Alternatively, an optional OneToOne association is sometimes mapped to a join table ... getCustomer() { return customer; } Example 2 : @Entity public class Employee { @Id int id; @Embedded JobInfo

jakarta.persistence.Embeddable

in the table or tables mapped by the owning entity. The persistent fields and properties of an embeddable class are mapped using the same mapping annotations used to map entity classes ... ; ... } Example 2 : @Embeddable public class PhoneNumber { protected String areaCode; protected String

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.SchemaManager

.getSchemaManager() Since: Jakarta Persistence (JPA) 3. 2 Public Instance Methods void create ( boolean createSchemas ) Create database objects mapped by entities belonging to the persistence unit ... dropSchemas ) Drop database objects mapped by entities belonging to the persistence unit, undoing

Inverse OneToMany Mapping and EmbeddedId

is attached. Sorry. to 2 : Path expressions are recognized now, but entitys from EmbeddedId are not mapped ... ; objectdb- 2 .9.0_03  *   *         issue: Inverse @OneToMany(mappedBy ... : Is it possible to map Entitys inverse OneToMany if this are  *        

jakarta.persistence.Column

: Annotation Target: Method, Field Specifies the column mapped by the annotated persistent property or ... ; } Example 2 : @Column(name = "DESC", columnDefinition = "CLOB NOT NULL", table = "EMP_DETAIL") @Lob ... = false, precision = 12, scale = 2 ) public BigDecimal getCost() { return cost; } Portable

jakarta.persistence.SecondaryTable

properties of the entity are mapped to the primary table. If no primary key join columns are specified ... { ... } Example 2 : Single secondary table with multiple primary key columns. @Entity @Table(name ... provider. Default: @ForeignKey(ConstraintMode.PROVIDER_DEFAULT) Since: Jakarta Persistence (JPA) 2 .1

Lazy loading of mapped by (inverse) singular references

ObjectDB ignores lazy setting of non collection mapped by (inverse) fields and loads ... , so it is always available. For mapped by (inverse) reference fields no information is stored in ... since the referenced object may be an instance of a subclass. Future versions of ObjectDB should manage mapped

Bulk load of eager mapped by (inverse) relationships

a separate client-server round trip. Future versions of ObjectDB should load eager mapped by (inverse) fields in bulk as well. support Support Bulk load of eager mapped by (inverse) singular references is now supported in build 2 .4.4_13. support Support ... . However, inverse ( mapped by) references that have to be loaded eagerly currently do not

JPQL support for mapped by (inverse) collections

, SIZE, MEMBER OF, IN) are currently not supported for mapped by (inverse) collections. These operations are supported for direct (not mapped by) collections. Navigation and JOIN is supported for both direct and mapped by collections. The following test case demonstrates a problematic query

Mapped by fields are not initialized by JOIN FETCH in queries

As demonstrated in this forum thread , a mapped by collection field with lazy fetch mode is not initialized in results of a query that uses JOIN FETCH on that collection field (when enhancement is used). support Support   Build 2 .4.1_06 fixes this issue (fields are now initialized

jakarta.persistence.Table

: Annotation Target: Type Specifies the primary table mapped by the annotated entity type. Additional tables ... by the Column and JoinColumn annotations and constraints entailed by primary key mappings . Defaults ... . Default: {} Since: Jakarta Persistence (JPA) 2 .1 CheckConstraint[] check (Optional) Check

jakarta.persistence.MappedSuperclass

Interfaces: Annotation Target: Type Declares a class which is not itself an entity, but whose mappings 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

jakarta.persistence.MapsId

the mapping for an EmbeddedId primary key, an attribute within an EmbeddedId primary key, or ... ; ... @MapsId("empid") // maps the empid attribute of embedded id @ManyToOne Employee emp; } If a ManyToOne ... is derived from the referenced parent entity. Since: Jakarta Persistence (JPA) 2 .0 Annotation Elements String

jakarta.persistence.ColumnResult

ConstructorResult annotation to map a column of the SELECT list of a SQL query. The name element references ... (JPA) 1.0 Class type (Optional) The Java type to which the column type is to be mapped . If the type element is not specified, the default JDBC type mapping for the column is used. Default: void/class

jakarta.persistence.EntityResult

: Annotation Used in conjunction with the SqlResultSetMapping or NamedNativeQuery annotation to map ... should select all the columns that are mapped to the entity object. This should include foreign key ... by the SQL query. Default: LockModeType.OPTIMISTIC Since: Jakarta Persistence (JPA) 3. 2 FieldResult

jakarta.persistence.Basic

: Annotation Target: Method, Field The simplest type of mapping of a persistent field or property ... apply. The database column mapped by the persistent field or property may be specified using the Column annotation. Example 1: @Basic protected String name; Example 2 : @Basic(fetch = LAZY) protected

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.JoinColumns

: Annotation Target: Method, Field Specifies the mapping for composite foreign keys. This annotation ... Persistence (JPA) 1.0 Annotation Elements JoinColumn[] value The join columns that map the relationship ... Persistence (JPA) 2 .1 Additional JDK methods inherited from java.lang.annotation.Annotation java.lang

jakarta.persistence.NamedAttributeNode

. See Also: NamedEntityGraph NamedSubgraph Since: Jakarta Persistence (JPA) 2 .1 Annotation Elements String 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.ConstructorResult

to map the SELECT clause of a SQL query to a constructor. Applies a constructor for the target class ... NamedNativeQuery ColumnResult Since: Jakarta Persistence (JPA) 2 .1 Annotation Elements Class ... ColumnResult[] columns (Required) The mapping of columns in the SELECT list to the arguments

jakarta.persistence.Converter

mapping descriptor. The target type for a converter is determined by the actual type argument of the first ... must automatically apply the converter to every mapped attribute of the specified target type belonging to any ... . See Also: AttributeConverter Convert Since: Jakarta Persistence (JPA) 2 .1 Annotation Elements boolean autoApply

jakarta.persistence.DiscriminatorColumn

inheritance mapping strategies . The mapping strategy and discriminator column are only specified ... with columnDefinition . Default: "" Since: Jakarta Persistence (JPA) 3. 2 int length (Optional) The column length

jakarta.persistence.ElementCollection

embeddable class . Must be specified if the collection is to be mapped by means of a collection table. The CollectionTable annotation specifies a mapping to a database table. Example: @Entity public class ... nickNames = new HashSet(); ... } See Also: CollectionTable Since: Jakarta Persistence (JPA) 2 .0 Annotation

jakarta.persistence.TypedQueryReference

) Since: Jakarta Persistence (JPA) 3. 2 Public Instance Methods Map getHints () A map keyed by hint name

jakarta.persistence.PessimisticLockScope

or used with the NamedQuery annotation. Since: Jakarta Persistence (JPA) 2 .0 Enum Constants EXTENDED ... is otherwise mapped to a secondary table, this entails locking the row(s) for the entity instance in the additional ... relationships that are mapped to join tables or unidirectional one-to-many relationships

ObjectDB 2.2.2

Changed log format to include date and time . Changed class loader management. Fixed handling multiple order expressions in inverse ( mapped by) fields. Fixed the behavior of CacheStoreMode setting in L2 shared cache. Fixed  TreeSet and TreeMap  element comparison bugs. Fixed an Explorer

jakarta.persistence.CollectionTable

Interfaces: Annotation Target: Method, Field Specifies the table that is used for the mapping of collections ... AttributeOverride AssociationOverride Column Since: Jakarta Persistence (JPA) 2 .0 Annotation Elements ... . Default: @ForeignKey(ConstraintMode.PROVIDER_DEFAULT) Since: Jakarta Persistence (JPA) 2 .1

Strings in JPQL and Criteria Queries

to 'aly' . SUBSTRING('Italy', 3, 2 ) is evaluated to 'al' . Positions are one-based (as in SQL), not ... ); Expression l2 = cb. locate (path, "x"); Expression l3 = cb. locate (path, param, cb. literal ( 2 )); Expression l4 = cb. locate (path, "x", 2 ); // LOWER(str) and UPPER(str) Expression lower = cb. lower (path