ObjectDB Database Search

51-100 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 ... - mapping , containing dogs and cats mixed up. Querying would not be as performant as with storing

Annotate a Map field with @ElementCollection or @Basic

Hello, we have an entity with a field whose type is a Map . Once we annotate the field with @ElementCollection, in the other case with @Basic. Is @Basic also a valid annotation for a Map field ... { @ElementCollection private Map values = new HashMap (); @Basic private Map values = new HashMap (); } best regards

Index on values from a Map

Hi, is there a way to put an Index on the values from an Map ? For example, if I have a Map like this: private Map mmsContainer and I want to access it fast in following way: Collection values ... queries, and cannot accelerate other application code. You can define an index on a map value

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

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

How to Persist a Map of beans to collections of beans?

a .odb file.  The class contains a field that is as follows: private Map m_objectToPersist; I'm ... persistence capable classes). Support of map values which are collections is non standard ... .  SomeOtherTypeOfBeanList , and use  Map ). support Support

Mapped By Fetch is very Slow

Well ! I think i pointed out a HUGE performance issue with mapped -by attribute (yeah again :( ). Here is the test case : 1- Create 100 000 entities with for each 1 entity with @OneToOne(mappedBy ... , 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 test fails because the query returns both TeamA and TeamB objects where only TeamA was specified in

NPE when reading map from DB

accessing an object (a persistent map field according to the stack trace) when the connection to the database is closed. support Support

Exception when querying Map property with @embedded & Enhancer enabled

Exception when querying Map property with @embedded & Enhancer enabled

Cascade delete with unidirectional mapping

Cascade delete with unidirectional mapping

SELECT clause (JPQL / Criteria API)

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

JPA Named Queries Annotations

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

Index Definition

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

What are the main benefits of using ObjectDB?

the execution time of object oriented applications significantly. For instance, collection and map

JPA Runtime Tuning & Configuration

): Defaults passed in a property map to the factory builder or defined in persistence.xml . EntityManager

Can I use ObjectDB to access a relational database?

To access relational databases using the Java Persistence API (JPA) you will need an Object Relational Mapping (ORM) tool, such as Hibernate, TopLink, EclipseLink, Open JPA or DataNucleus. The DataNucleus ORM implementation supports also the Java Data Objects (JDO) API. ObjectDB is a full featured

Deleting JPA Entities

, non-shared dependent objects. You can also set orphan removal for collection and map fields

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

jakarta.persistence.AttributeNode

of the attribute. Since: Jakarta Persistence (JPA) 1.0 Map getKeySubgraphs () Return a map of subgraphs associated with this attribute node's map key. Returns: a Map of subgraphs associated with this attribute node's map key or an empty Map if none have been defined. Since: Jakarta Persistence (JPA) 1.0 Map

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 ... that corresponds to a map key that is a managed type. This allows for construction of multi-node entity

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 ... a node to the graph that corresponds to a map key that is a managed type. This allows

jakarta.persistence.metamodel.ManagedType

, mapped superclass, and embeddable types. Since: Jakarta Persistence (JPA) 2.0 Public Instance Methods ... MapAttribute getDeclaredMap ( String name , Class keyType , Class valueType ) Return the Map -valued ... MapAttribute getDeclaredMap ( String name ) Return the Map -valued attribute declared by the managed type

jakarta.persistence.metamodel.EmbeddableType

name , Class keyType , Class valueType ) Return the Map -valued attribute declared by the managed ... getDeclaredMap ( String name ) Return the Map -valued attribute declared by the managed type ... -, and Map -valued attributes) declared by the managed type. Returns empty set if the managed type

jakarta.persistence.criteria.CriteriaBuilder

( M map ) Create an expression that returns the keys of a map . Parameters: map - map Returns: set ... . Since: Jakarta Persistence (JPA) 1.0 Expression values ( M map ) Create an expression that returns the values of a map . Parameters: map - map Returns: collection expression. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.metamodel.MapAttribute

: - The type the represented Map belongs to - The type of the value of the represented Map - The type of the key of the represented Map Super Interfaces: PluralAttribute , Attribute , Bindable Instances of the type MapAttribute represent persistent Map -valued attributes. Since: Jakarta Persistence (JPA

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");   

Inverse OneToMany Mapping and EmbeddedId

: Is it possible to map Entitys inverse OneToMany if this are  *         ... .PersistenceException id.ab is not found in type C ( mapped by [Single] field debug ... is not found in type C ( mapped by [Single] field debug.OdbInverseEmbIdMapping$AB.cs null)  

Bulk load of eager mapped by (inverse) relationships

. However, inverse ( mapped by) references that have to be loaded eagerly currently do not ... 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

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.MapKeyColumn.name

) The name of the map key column. The table in which it is found depends upon the context. If the map key is for an element collection, the map key column is in the collection table for the map value. If the map key is for a ManyToMany entity relationship or for a OneToMany entity relationship using a join

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

jakarta.persistence.JoinTable

: Annotation Target: Method, Field Specifies the mapping of an association to an intermediate join table. It is applied to the owning side of an association. A join table is typically used in the mapping of many-to-many and unidirectional one-to-many associations. It may also be used to map

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 ... collection is a Map , the cascade element applies to the map value. Defaults to no operations

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 ... must always exist. May be used in schema generation to infer that the mapped foreign key column

jakarta.persistence.MapKeyJoinColumns

Interfaces: Annotation Target: Method, Field Supports composite map keys that reference entities ... (JPA) 2.0 Annotation Elements MapKeyJoinColumn[] value (Required) The map key join columns that are used to map to the entity that is the map key. Since: Jakarta Persistence (JPA) 1.0 ForeignKey

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

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.criteria.Path

. Since: Jakarta Persistence (JPA) 1.0 Expression get ( MapAttribute map ) Create a path corresponding to the referenced map -valued attribute. Parameters: map - map -valued attribute Returns: expression

jakarta.persistence.JoinColumn.name

. 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 entity. If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany

jakarta.persistence.IdClass

: Annotation Target: Type Specifies a composite primary key type whose fields or properties map ... equality consistently with equality of the mapped primary key of the database table. The primary key fields ... properties with matching names and types. The mapping of fields or properties of the entity to fields or

jakarta.persistence.InheritanceType

, Serializable Enumerated the options for mapping entity inheritance. See Also: Inheritance.strategy ... , with only the columns mapped to persistent fields and properties declared by the entity class. Each class in the hierarchy has its own table, but that table does not contain columns mapped

jakarta.persistence.Inheritance

: Annotation Target: Type Specifies the inheritance mapping strategy for the entity class hierarchy ... if no inheritance type is specified for an entity class hierarchy, the SINGLE_TABLE mapping strategy ... (JPA) 1.0 Annotation Elements InheritanceType strategy The inheritance mapping strategy

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 ... attribute corresponds. If not explicitly specified, the relationship maps the primary key of the entity

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