About page

forum_thread

Restrict by class in query

I have the following bit of code: ... query language statement. See JavaDoc Reference Page...  an  IllegalArgumentException has to be thrown if ...

 
forum_thread

Removing objects where ManyToMany relationships exist

Consider you have an entity Entity with the following unidirectional relationship: @ManyToMany private Set<OtherEntity> setOfOtherEntities; public Set<OtherEntity> getOtherEntities() {     if (setOfOtherEntities == null) {       setOfOtherEntities = new TreeSet<OtherEntity>();     }     return setOfOtherEntities;   } ... but the entity does not exist. See JavaDoc Reference Page... , but sometimes it could be wrapped by another exception, and ...

 
forum_thread

Queries are slow on a large database

Hi, I have a 12GB database with 787603 entries. It is much larger than usual and there are performances issues. I am doing small queries and they take much longer than I expect, i.e.: Get the total number of entries Get 25 consecutive entries (i.e. 0-25) Get one specific entry On average each query needs 4 to 5 minutes to return a result. I have been adviced to use indexes but they are already used through the JDO Metadata file. For instance I use this class: ... representation of the query. See JavaDoc Reference Page... , with very fast execution time. Similarly to get ...

 
issue

stress test -> com.objectdb.o.InternalException: null

I am running a stress test with 2 users, each making a request to the JSON API (which uses as storage ObjectDB) each 50 milliseconds. An API call might have between 1-4 db calls, but they are relatively light, and the db has just a few MB at the moment. After a few minutes I got this exception. If I decrease the load, it doesn't happen. If I increase it, I get it very often. Any solution/fix? A sample project is very hard, if not impossible, to create, because it uses all the system. ... entities in the persistence unit. See JavaDoc Reference Page... methods (e.g. entity) can register types without persisting ...

 
forum_thread

can not use spring-data-jpa repository with NamedQuery

in spring-data-jpa named queries are used to implement repository interface methods, see http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/#jpa.query-methods.named-queries for example ... declared parameters of the query. See JavaDoc Reference Page... method was just added in build 2.2.3_02. Please try it. ...

 
forum_thread

@ElementCollection of type enum

Hi! I have in an entity called User with the following field: @ElementCollection(fetch = FetchType.EAGER) private Set<UserPermission> permissions; package x.x.x.x public enum UserPermission { BASIC, COACH, ADMIN } Use case: there are users which contain the first 2 permissions (BASIC and COACH, so the first 2 entries). ... persisted as a enumerated type. See JavaDoc Reference Page... . ObjectDB Support ObjectDB - ...

 
issue

JPA Metamodel (JPA 2.0)

The JPA Metamodel API enables examining the classes, fields and properties of the persistent object model, similarly to the Java reflection API. The JPA Metamodel API has a major role in defining queries using the JPA Criteria API.... type and attribute interfaces. See JavaDoc Reference Page... API enables examining the classes, fields and properties of the ...

 
forum_thread

The attribute column name (EXCEPTION) is a reserved SQL-99 keyword.

How do I fix this error/warning that Netbeans gives me? <img src="http://www.objectdb.com/files/attachments/Ashton/reserved.png" alt="Reserved Keyword" /> ... a persistent property or field. See JavaDoc Reference Page... annotation that will map the name of the Java field to ...

 
release

2.3.3

... declared parameters of the query. See JavaDoc Reference Page... method. Added exception on pessimistic locking ... a basic type or embeddable class. See JavaDoc Reference Page...  (for setting eager fetch of non entity collections, such ...

 
release

2.2.3

... a basic type or embeddable class. See JavaDoc Reference Page...  (for setting eager fetch of non entity collections, such ...