Internal Website Search

51-100 of 200 results

Optimistic locking: prevent version increment on entity collection attribute

Hello, I have an entity E with an attribute which is a collection of entities (one to many ... the increment of the version of entity E when entities are added to or removed from the collection ... Farid Oudjane If it is a bidirectional relationship that is owned by the entities in the collection

Query to search for common elements in two separate collections.

I'm trying to work out the most efficient way to build a query that can compare two collections ... efficient way is to use some sort of hash function for the collections and to retrieve candidate collections by identical hash code. Candidate collections should then be further filtered by checking

Using Scala collections with ObjectDB

Hi, I cannot see that it is possible to make scala collection classes persistable ... of the scala. collection ._  api for it to work ? (http://www.scala-lang.org/docu/files/ collections -api/ collections .html)   /Peter   lsPeter Peter You are right - Scala collections

collection of embedded objects

1. In general, are there any restrictions of the use of @Embedded objects in collections , compared to @Entity ? 2. If you have a large nested collection of @Embedded objects, and you remove the parent @Entity , does the remove cascade through the whole collection ? 3. Is searching

Custom collection types

Hi   In our project in few places there are used collections from emf framework eg EcoreEMap ... , nevertheless it causes some questions. I checked that i can easily change the type of collection between ... of this classes but only their content so I suppose that you treat collections some how differently. Can i

PersistenceManager.getObjectsById(Collection,boolean) throwing JDOException

I have a call to getObjectsById( Collection ,boolean) that is throwing a JDOException the first time ... why this might occur? We're using ObjectDB 2.2.4_02. The collection being passed in is a HashSet ... argument. What happens if getObjectsById() is called with an empty collection ? carr.onstott Carr

Lazy Init / Eager / Join Fetch collection strategy ? What to choose ?

Hello, I'm doing some tests to choose the best collection fetch strategy. I have entities with many lazy collections and i don't want to load them all. (depends on context) In JPA / Hibernate world ... seems to be more efficient than only fetch required collections . Can you confirm my observations ? To finish, wake

No clue how to query with collection

;    Collection getAddresses(); } Now what I want to do is to select all available Customer Entites and ORDER them by the first Address - Item (if any) in the collection ... only.. thanks! Alex quasado Alexander Adam hi, okay I've decided that selecting the first item of a collection

Nested Collection Query

; How do I check if a particular member exist in one of the group? snoopydoghk Ka Leung Nesting a collection directly in another collection , although supported by ObjectDB, is not valid in JPA. Accordingly ... ) but it wouldn't be efficient. The recommended solution is avoid collections of collections , and instead wrap

Fetching Collections Puzzle

,   As posted above your collection should be initialized as soon as you try to get the children ... of the collection . This will only work if you are within a transaction. (I usually do not start a transaction ... join fetch n.children where ....." this will also fetch your collection . Basically you can use

PostUpdate collection null

Hello, I have an entity MyEntity with a collection attribute myCollection. I ... method, this collection is null. If I try to access the collection from the PreUpdate method, the collection is populated. The collection is eagerly fetched. public class MyEntity {    

Multiple Collection Fields not update correctly

  v2.8.8_2 I have an entity that has 2 collection fields: @OneToMany(fetch = FetchType.EAGER)      Collection position;      @OneToMany(fetch = FetchType.EAGER)      Collection rotation ;   Now if I persist them so the values are: position

LEFT JOIN FETCH over empty embedded collection returns no results

to my inquiry a few months ago. However, I have run into one problem: if an embedded collection is empty, but I attempt to LEFT JOIN FETCH all the members of a collection within a (non-existent) member of the first collection , the result of the overall query is an empty set. To use the example from

Navigation to Collection Elements

Greetings ObjectDB team, Suppose I have a collection typed field (list/map/set...) in my  ... handling such expressions. Indexes are supported in handling more conventional  collection ... supported in queries, and anyway, collections are preferred over arrays when using JPA/JDO (and they might be even more efficient). support Support

Composite index support collection

Hello, is there any chance that you support composite indices with fields and collections combined in the future? We need such feature in our application and would be very happy to see it in ... (probably with a restriction of one collection ). support Support Hello, yes, one collection

Search through collection for value using index

I have an entity that contains a java collection of a Long id of user entities that can modify ... could do something besides a java collection if there is a better approach. SailBlue5 Michael Herman You can define an index on a collection field as explained in the manual , and the index

Eager Fetch is not stable for collection or map types?

Hi, thanks very much for your helpful software. The problem is the storage of  collection or ... 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: 

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 parameter? Set values = new HashSet (); values.add("c2"); String query = // "SELECT e " + "FROM ... with a parameter which is a collection of strings. SELECT e FROM EntityParent e JOIN e . map key

Query to find object from element of a contained collection

I have an OrderData class, containing an OrderItemData collection , i would like to find OrderData elements by OrderData.items.itemId. I cant get a proper query with MEMBER OF or IN. Does ... addition, replace the ordinary array with a collection (e.g. ArrayList ). You may also need to use

Navigation through Path to evaluate collection

Hello, I need to evaluate a field ("identifier") which is situated in a collection , within an entity. As stated in the documentation it is not possible to navigate there with the dot operator since its a collection . Is it there a way to evaluate this field? Here is the query, the entity

Is there a way to set EAGER fetch on all "ToMany" collection relationships

Given that the default seems to be FetchType.LAZY for all collections @OneToMany and @ManyToMany. Such as a configuration option. Instead of having to explicitly set fetch in annotation code in every relationship. webel Dr Darren Kelly No. There is no such configuration option, since having EAGER

NontransactionalWrite error using Collections.sort .

Hi, i started to use ObjectDB today and i'm having problem using command  Collections .sort in persisted object.  Attempt to modify an object with no active transaction when NontransactionalWrite is disabled: br.ufpa.linc.MetriX.api.model.Interface#105 (error 635)   I don't want

@ElementCollection query returning extra result per element in collection

Hi,   I'm having a hard time narrowing down an issue that only became apparent with in the UI. The issue is that, I'm getting repeated results of the owning entity of an '@ElementCollection'. The entity returned is repeated for every element in the collection . Switching back to EclipseLink

Delete object from collection versus delete from JPQL

on a collection , but I'm not sure if that will alter my program state.  Will it? Thanks, Lee 

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

persistence capable classes). Support of map values which are collections is non standard

How to apply constraints in collection attributes of entity.

How to apply constraints like unique, not null ...etc in collection attribute of a entity. Example : @Entity @Table(name = "agent") public class Agent implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long Id; private List PhoneNumbers; public Agent() { } public

Persisting collection where members are subclasses

Persisting collection where members are subclasses

how to persist an object twice into two diff. collections of two diff. classes

how to persist an object twice into two diff. collections of two diff. classes

How to move @Embedable collection to a dedicated entity class?

How to move @Embedable collection to a dedicated entity class?

javax.persistence.criteria.CriteriaBuilder

; collection ) Create a predicate that tests whether a collection is empty. Parameters: collection ... Since: JPA 2.0 Predicate isMember (E elem,  Expression   collection ) Create a predicate that tests whether an element is a member of a collection . If the collection is empty, the predicate

ObjectDB Server not able to handle large collections

We've tried to do a migration in large collection which failed with the following exception in ... Due to the size of that collection the containing entity object exceeds the maximum supported size ... . support Support In the collection which we got from the DB query and failed to iterate in the client

Collection update does not increase entity version and is not persisted

Hello, I found a bug when adding elements to a collection of Entities: Event { Collection ... Markus Ritter Your test case demonstrates an issue in tracking changes to a collection in an object of an old schema, in which the collection was not exist yet (as of changing attachment to attachments

Tracking changes to new collections (in enhancement mode) after flush

, relying on automatic invocation of change events, including in embedded collections . We should check how this is implemented for nested collections . Note that this structure of a List as a value in a Map ... , which helped to find the bug. Actually the issue is not related to nested collections

JPQL support for mapped by (inverse) collections

As discussed and demonstrated in this forum thread , collection operators and methods (IS EMPTY, 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

Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled

Hello! When the JPA entities are not enhanced the removal of an entry from a @OneToMany collection ... you for this report. It represents an issue with non enhanced classes, but it is not related to @OneToMany collection ... . support Support Hello, I have tried version 2.6.0_04. The problem with the @OneToMany collection

Internal exception: NPE on criteria query with IN clause and empty collection

use JPA criteria query API, and I pass an empty collection to IN expression: CriteriaBuilder cb

delete of a collection in explorer changes type

accidently we used the option delete on a collection of type ArrayList . On doing so the type changed to List . we are using explorer version 2.7.1_02 How can we change that back again ? hgzwicker Hans-Georg Zwicker Is it only an issue with the type of the field as shown by the Explorer or

New Java 8 (JDK 1.8) Collection Methods

ObjectDB version 2.5.5 (and above) supports Java 8 (JDK 1.8). Tracking changes to collections and maps using some new Java 8 methods is currently not fully supported. The main known issue is that orphan removal does not happen as a result of removing a reference to an object

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

Objects are not garbage collected

Objects are not garbage collected

javax.persistence.criteria.From

to an entity in the from clause. Serves as a factory for Joins of associations, embeddables, and collections ... Methods Fetch fetch ( PluralAttribute  attribute) Create a fetch join to the specified collection ... ; JoinType  jt) Create a fetch join to the specified collection -valued attribute using

javax.persistence.Convert

collection of basic type (in which case the converter is applied to the elements of the collection ). In ... to an embedded attribute or to a map collection attribute whose key or value is of embeddable type (in ... in the collection ). In these cases, the attributeName element must be specified. To override

javax.persistence.ElementCollection

Specifies a collection of instances of a basic type or embeddable class. Must be specified if the collection is to be mapped by means of a collection table. Example: @Entity public class Person { @Id ... ) Whether the collection should be lazily loaded or must be eagerly fetched. The EAGER strategy

javax.persistence.metamodel.EmbeddableType

Since: JPA 2.0 CollectionAttribute getCollection (String name) Return the Collection -valued attribute ... the Collection -valued attribute of the managed type that corresponds to the specified name and Java ... (String name) Return the Collection -valued attribute declared by the managed type

javax.persistence.CollectionTable

the table that is used for the mapping of collections of basic or embeddable types. Applied to the collection -valued field or property. By default, the columns of the collection table that correspond ... type, the column name is derived from the name of the collection -valued field or property. In the case

javax.persistence.metamodel.ManagedType

(String name) Return the Collection -valued attribute of the managed type that corresponds ...  elementType) Return the Collection -valued attribute of the managed type that corresponds ... CollectionAttribute getDeclaredCollection (String name) Return the Collection -valued attribute

javax.persistence.metamodel.IdentifiableType

 name) Return the Collection -valued attribute of the managed type that corresponds ...  name, Class  elementType) Return the Collection -valued attribute of the managed type ... Since: JPA 2.0 CollectionAttribute getDeclaredCollection (String name) Return the Collection -valued

javax.persistence.criteria.Join

from: From Since: JPA 2.0 CollectionJoin join ( CollectionAttribute   collection ) Create an inner join to the specified Collection -valued attribute. Parameters: collection - target of the join ...   collection ,  JoinType  jt) Create a join to the specified Collection -valued

javax.jdo.Query

. There are three required elements in a Query : the class of the results, the candidate collection ... of the subquery candidateCollectionExpression - the candidate collection of the subquery as an expression using ... to be used in this Query candidateCollectionExpression - the candidate collection to apply

Query.setFilter(filter) - JDO Method

that is to be evaluated for each of the instances in the candidate collection . If the filter is not specified, then it defaults to "true", which has the effect of filtering the input Collection only for class type. An element of the candidate collection is returned in the result if: it is assignment compatible