Internal Website Search

51-100 of 200 results

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: 

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

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 -files: META-INF/orm.xml META-INF/ormreq.xml We start the enhancer and the entities of orm.xml ... Why the second mapping -file is ignored?   The unit test has following result, because not

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

Query with MEMBER OF on hash map values

Hello, we want to execute following query: SELECT tc FROM TC tc WHERE ?1 MEMBER OF tc.testMacros.values() But we get an internal ObjectDB exception. It is possible to implement a query for this case at all?   @Entity public class TC { @OneToMany Map testMacros = new HashMap(); }   btc_es

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

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

Feature Request: Adding map entries to DB in Explorer

Currently, collections can be edited but maps cannot be edited. For a database model that has a lot of static data that need to be entered into the database on multiple edits this presents as an inconvenience. It would be great, therefore, if we can edit maps straight from the explorer. Flying Banana Jiacong Xu

javax.persistence.MapKeyJoinColumn

a mapping to an entity that is a map key. The map key join column is in the collection table, join table, or table of the target entity that is used to represent the map . If no MapKeyJoinColumn ... ")) @MapKeyJoinColumn(name="DIVISION") Map organization; } Example 2: @Entity public class

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

javax.persistence.MapKeyColumn

the mapping for the key column of a map whose map key is a basic type. If the name element is not ... _ MAPPING ") Map images; // map from image name to filename ... } Since: JPA 2.0 Public Annotation Attributes ... "" (Optional) The name of the map key column. The table in which it is found depends upon the context

javax.persistence.Convert

to an embedded attribute or to a map collection attribute whose key or value is of embeddable type (in ... conversion mappings at multiple levels of embedding, a dot (".") notation form must be used in ... annotation is applied to a map containing instances of embeddable classes, the attributeName element

javax.persistence.AttributeOverride

Used to override the mapping of a Basic (whether explicit or default) property or field or Id property or field. May be applied to an entity that extends a mapped superclass or to an embedded field or property to override a basic mapping or id mapping defined by the mapped superclass or embeddable

javax.persistence.metamodel.IdentifiableType

JPA Interface IdentifiableType Type Parameters: - The represented entity or mapped superclass type ... mapped superclass types. Since: JPA 2.0 Public Methods Attribute getAttribute (String name ... attribute declared by the entity or mapped superclass. Parameters: type - the type of the represented

javax.persistence.JoinColumn

one-to-many association using a foreign key mapping // In Customer class @OneToMany @JoinColumn(name="CUST ... mapping using a foreign key mapping strategy, the foreign key column is in the table of the source entity or embeddable. If the join is for a unidirectional OneToMany mapping using a foreign key mapping

javax.persistence.EntityManager

grouped by the application, and which must be colocated in their mapping to a single database ... of their appearance in the select list and default JDBC type mappings are applied. Parameters: sqlString ... set mapping Return: the new query instance Since: JPA 1.0 Query createQuery ( CriteriaDelete  

javax.persistence.MappedSuperclass

whose mapping information is applied to the entities that inherit from it. A mapped superclass ... can be mapped in the same way as an entity except that the mappings will apply only to its subclasses since no table exists for the mapped superclass itself. When applied to the subclasses the inherited

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

javax.persistence.criteria.From

: FetchParent Since: JPA 2.0 Expression get ( MapAttribute   map ) Create a path corresponding to the referenced map -valued attribute. Parameters: map - map -valued attribute Return: expression corresponding ... ( MapAttribute   map ) Create an inner join to the specified Map -valued attribute. Parameters: map

javax.persistence.EntityManagerFactory

results, hints, flush mode, lock mode, result set mapping information, and information about stored ... Since: JPA 1.0 EntityManager createEntityManager ( Map   map ) Create a new application-managed EntityManager with the specified Map of properties. This method returns a new EntityManager instance each

javax.persistence.MapKey

JPA Annotation MapKey Target: METHOD, FIELD Implemented Interfaces: Annotation 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

javax.persistence.criteria.MapJoin

JPA Interface MapJoin Type Parameters: - the source type of the join - the type of the target Map key - the type of the target Map value Super Interfaces: Expression , FetchParent , From , Join ... . Map . Since: JPA 2.0 Public Methods Expression entry () Create an expression that corresponds

javax.persistence.NamedStoredProcedureQuery

annotation can be applied to an entity or mapped superclass. The name element is the name ... classes) that are used to map the results. The resultSetMappings element names one or more result set mappings , as defined by the SqlResultSetMapping annotation. If there are multiple result sets

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

javax.persistence.MapKeyClass

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 using Java generics, the MapKeyClass annotation ... (targetClass=String.class) @MapKeyClass(String.class) Map images; // map from image name to image filename

javax.persistence.AttributeNode

. Return: name of the attribute Since: JPA 2.1 Map getKeySubgraphs () Return the Map of subgraphs associated with this attribute node's map key. Return: Map of subgraphs associated with this attribute node's map key or empty Map if none have been defined Since: JPA 2.1 Map getSubgraphs () Return

javax.persistence.metamodel.ManagedType

Instances of the type ManagedType represent entity, mapped superclass, and embeddable types. Since: JPA 2.0 ... type Since: JPA 2.0 MapAttribute getDeclaredMap (String name) Return the Map -valued attribute ... the Map -valued attribute declared by the managed type that corresponds to the specified name and Java

javax.persistence.PrimaryKeyJoinColumn

to join the primary table of an entity subclass in the JOINED mapping strategy to the primary table ... to a primary table; and it may be used in a OneToOne mapping in which the primary key of the referencing ... is specified for a subclass in the JOINED mapping strategy, the foreign key columns are assumed

javax.persistence.metamodel.EmbeddableType

MapAttribute getDeclaredMap (String name) Return the Map -valued attribute declared by the managed type ... the Map -valued attribute declared by the managed type that corresponds to the specified name and Java ... -, List-, and Map -valued attributes) declared by the managed type. Returns empty set if the managed

javax.persistence.criteria.CriteriaBuilder

- expression to be tested Return: predicate Since: JPA 2.0 Expression keys (M  map ) Create an expression that returns the keys of a map . Parameters: map - map Return: set expression Since: JPA 2.0 ... : expression to convert to uppercase Since: JPA 2.0 Expression values (M  map ) Create an expression

javax.persistence.criteria.Join

: From Since: JPA 2.0 MapJoin join ( MapAttribute   map ) Create an inner join to the specified Map -valued attribute. Parameters: map - target of the join Return: the resulting join Inherited from: From Since: JPA 2.0 MapJoin join ( MapAttribute   map ,  JoinType  jt) Create a join

javax.persistence.metamodel.MappedSuperclassType

: IdentifiableType , ManagedType , Type Instances of the type MappedSuperclassType represent mapped ... ) Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass ... to the version attribute declared by the entity or mapped superclass. Parameters: type - the type

javax.jdo.JDOHelper

getPersistenceManagerFactory ( Map  props) Get a PersistenceManagerFactory based on a Properties instance ... PersistenceManagerFactory getPersistenceManagerFactory ( Map  props, ClassLoader pmfClassLoader) Get a PersistenceManagerFactory based on a Map and a class loader. This method delegates

javax.jdo.Query

;String variableDeclaration, String candidateCollectionExpression,  Map  parameters) Add a subquery to this query. The Map version of the method treats the key of each map entry as ... for either the parameter or the value of the String[], or for any map key or value, that expression is ignored

javax.jdo.PersistenceManagerFactory

. Return: the default IngoreCache setting. Since: JDO 1.0 String getMapping () Get the Mapping setting for this factory. This is used to find the object-datastore mapping file(s). Return: the Mapping ... . Parameters: flag - the default IgnoreCache setting. Since: JDO 1.0 void setMapping (String  mapping