ObjectDB Database Search

51-100 of 200 results

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

to console a lazy @OneToMany mapped field after a finding entity manager closes. There is a switch DO_VIEW ... manager closes and as expected both a mapped @OneToMany list and an unmapped @OneToMany list are viewable: a.listA_ mapped :[{A}[4]"ownedElement1", {A}[5]"ownedElement2"] a.listB_unmapped:[{B}[2]"b1", {B}[3

Optimization of Map Queries

hi! I am having loads and loads of occurrences of something like ((com.test.MyEntity) $1. map .get('com.test.MyEntity')).someProperty ... ((com.test.MyEntity) $1. map .get('com.test.MyEntity')).someOtherProperty .. ((com.test.MyEntity) $1. map .get('com.test.MyEntity')).someMoreProperties I need to use

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

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

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

Is it ok to put list or map of embeddable objects in entity ?

Hi, Is it ok to put list or map of embeddable objects in entity? I mean, for example : @Entity ... bList;     @Embedded     Map cMap; (...) } where Class_B and Class_C ... ; Thanks in advance for help. kborkowski Karol Borkowski Collections and maps of any persistable type

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: 

jakarta.persistence.criteria.ListJoin

Persistence (JPA) 1.0 Expression get ( MapAttribute map ) Create a path corresponding to the referenced map -valued attribute. Inherited from Path Parameters: map - map -valued attribute Returns: expression ... join. Since: Jakarta Persistence (JPA) 1.0 MapJoin join ( MapAttribute map ) Create an inner join

jakarta.persistence.criteria.From

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

jakarta.persistence.criteria.Join

to the referenced attribute. Since: Jakarta Persistence (JPA) 1.0 Expression get ( MapAttribute map ) Create a path corresponding to the referenced map -valued attribute. Inherited from Path Parameters: map - map ... ) 1.0 MapJoin join ( MapAttribute map ) Create an inner join to the specified Map -valued attribute

SELECT clause (JPQL / Criteria API)

value path expressions can be used in the SELECT clause. Collection and map fields cannot be included

Index Definition

for every index. A BTree is an ordered map data structure that ObjectDB maintains in the file

What are the main benefits of using ObjectDB?

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

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 Entity Objects

for collection and map fields. For example: @Entity class Employee { : @OneToMany ( orphanRemoval

Entity Management Settings

class, mapped super class or embeddable class). The element The element specifies global settings

JPA Annotations for Classes

JPA defines three types of persistable classes which are set by the following annotations: Chapter 2 of the ObjectDB manual explains these annotations in detail. Entity and mapped super classes can be further configured by annotations that specify cache preferences and lifecycle event listener

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

Interfaces: Annotation Target: Type Declares a named native SQL query and, optionally, the mapping ... set mapping is needed, which may be specified using either a separate annotation: @NamedNativeQuery ... class or mapped superclass. See Also: SqlResultSetMapping Since: Jakarta Persistence (JPA) 1.0

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

, and its result type. The NamedStoredProcedureQuery annotation can be applied to an entity or mapped ... . The resultClasses element refers to the class (or classes) that are used to map the results. The resultSetMappings element names one or more result set mappings , as defined by the SqlResultSetMapping annotation

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

addKeySubgraph ( Attribute attribute ) Add a node to the graph that corresponds to a map key that is a managed ... ) Add a node to the graph that corresponds to a map key that is a managed type with inheritance ... ) Add 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.PrimaryKeyJoinColumn

the JOINED mapping strategy to the primary table of its superclass; it is used within a SecondaryTable annotation to join a secondary table to a primary table; and it may be used in a OneToOne mapping in ... . If no PrimaryKeyJoinColumn annotation is specified for a subclass in the JOINED mapping strategy

jakarta.persistence.Subgraph

a node to the graph that corresponds to a map key that is a managed type. This allows ... that corresponds to a map key that is a managed type with inheritance. This allows for construction ... that corresponds to a map key that is a managed type. This allows for construction of multi-node entity

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

of the entity that is the owner of the relationship. A OneToMany association usually maps a foreign key column or columns in the table of the associated entity. This mapping may be specified using the JoinColumn annotation. Alternatively, a unidirectional OneToMany association is sometimes mapped

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

jakarta.persistence.MapKeyJoinColumn.table

) The name of the table that contains the foreign key column. If the join is for a map key for an element collection, the foreign key column is in the collection table for the map value. If the join is for a map key for a ManyToMany entity relationship or for a OneToMany entity relationship using

jakarta.persistence.PersistenceConfiguration

( String name ) Add the path of an XML mapping file loaded as a resource to the configuration. Parameters: name - the resource path of the mapping file Returns: this configuration. Since: Jakarta Persistence (JPA) 1.0 List mappingFiles () The configured resource paths of XML mapping files. Returns

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

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

Interfaces: Annotation Target: Type Specifies a mapping of the columns of a result set of a native SQL ... mapping , and used to refer to it in the methods of the Query and StoredProcedureQuery APIs. Since: Jakarta Persistence (JPA) 1.0 EntityResult[] entities Specifies the result set mapping to entities

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

JPQL support for Maps (JPA 2.0)

JPQL 2.0 introduces the ability define FROM variables for map keys and values. Currently ObjectDB supports FROM variables for collection elements. FROM variables for map keys and values are expected ... Minnoye Actually  map values are now supported but not map keys. support Support Hi, I've tested

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)  

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

. 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

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