ObjectDB Database Search
101-150 of 200 resultsMapped (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:  | |
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 enabledException when querying Map property with @embedded & Enhancer enabled | |
Cascade delete with unidirectional mappingCascade delete with unidirectional mapping | |
mappedSuperClass and subClass Duplicates, classes that are declared as mapped superclasses have some of the features of entity classes, but also some restrictions. ObjectDB, however, does not enforce these restrictions so mapped superclasses are treated by ObjectDB as ordinary entity classes. Mapped superclasses are really only useful in | |
AnnotationRef jakarta.persistence.PreUpdate JPA Annotation PreUpdate Target: METHOD Implemented Interfaces: Annotation 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 class. Since: JPA 1.0 The JPA Lifecycle Events | |
AnnotationRef jakarta.persistence.PreRemove JPA Annotation PreRemove Target: METHOD Implemented Interfaces: Annotation 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 class. Since: JPA 1.0 The JPA Lifecycle Events | |
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");   | |
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 | |
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 | |
AnnotationRef jakarta.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 ... for the map key. The table in which it is found depends upon the context. If the join is for a map key | |
AnnotationRef jakarta.persistence.MapKeyColumn the mapping for the key column of a map whose map key is a basic type. If the name element is not ... varbinary types. Since: JPA 2.0 String name default "" (Optional) 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 | |
InterfaceRef jakarta.persistence.EntityManagerFactory their mapping to a single database. If two entity types participate in an association ... , result set mapping information, and information about stored procedure parameters. When the query ... createEntityManager ( Map map ) Create a new application-managed EntityManager with the given Map specifying | |
InterfaceRef jakarta.persistence.spi.PersistenceProvider, Map map ) Called by the container when an EntityManagerFactory is to be created. Parameters: info - metadata for use by the persistence provider map - a Map of integration-level properties ... the classpath, the container must pass the {@code ValidatorFactory} instance in the map with the key {@code | |
AnnotationRef jakarta.persistence.JoinColumn is for a OneToOne or ManyToOne 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 strategy, the foreign key is in the table of the target entity | |
InterfaceRef jakarta.persistence.EntityManager the order of their occurrence in the select list and default JDBC type mappings are applied. Parameters ... mapping Return: the new query instance Since: JPA 1.0 Query createQuery ( CriteriaDelete deleteQuery ... are to be mapped Return: the new stored procedure query instance Throws: IllegalArgumentException - if a stored | |
AnnotationRef jakarta.persistence.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. An entity class holds state, represented as persistent fields and properties: a field or property of plain maps to a single plain in one of the tables | |
AnnotationAttrRef 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 | |
InterfaceRef jakarta.persistence.criteria.From map ) Create a path corresponding to the referenced map -valued attribute. Parameters: map - map ... Return: the resulting join 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 | |
InterfaceRef jakarta.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 | |
AnnotationAttrRef 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 | |
InterfaceRef jakarta.persistence.AttributeNode. Return: name of the attribute Since: JPA 2.1 Map getKeySubgraphs () Return a map of subgraphs associated with this attribute node's map key. Return: a {@link Map } of subgraphs associated with this attribute node's map key or an empty {@code Map } if none have been defined Since: JPA 2.1 Map | |
InterfaceRef jakarta.persistence.metamodel.EmbeddableType MapAttribute getDeclaredMap (String name) Return the Map -valued attribute declared by ... ) Return the Map -valued attribute declared by the managed type that corresponds to the specified name ... (Collection-, Set-, List-, and Map -valued attributes) declared by the managed type. Returns empty set | |
AnnotationRef jakarta.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 | |
InterfaceRef jakarta.persistence.criteria.CriteriaBuilder 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 Predicate le ( Expression ... Since: JPA 2.0 Expression values (M map ) Create an expression that returns the values of a map | |
InterfaceRef jakarta.persistence.spi.PersistenceUnitInfo getMappingFileNames () Returns the list of the names of the mapping files that the persistence provider must load to determine the mappings for the entity classes. The mapping files must be in the standard XML mapping format, be uniquely named and be resource-loadable from the application classpath | |
PersistenceUnitInfo.getMappingFileNames() - JPA Method the list of the names of the mapping files that the persistence provider must load to determine the mappings for the entity classes. The mapping files must be in the standard XML mapping format, be uniquely named and be resource-loadable from the application classpath. Each mapping file name corresponds | |
InterfaceRef jakarta.persistence.criteria.Join: the resulting join Inherited from: 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 ,  |