ObjectDB Database Search

51-100 of 172 results

Extra uninitialised entities spawned on merge()

;      Element root = new Element(null, " root ");         em.persist( root );         em.getTransaction().commit();         Long id = root .getId();     

jakarta.persistence.criteria.CriteriaDelete.getRoot()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaDelete Root getRoot() Return the query root . Returns: the query root . Since: Jakarta Persistence (JPA) 1.0

multiple LEFT JOINs do not work as expected

stores a reference to it parent organisation. I'm trying to find all organisations 2 levels under a root organisation, e.g. where organisation.parentOrg is the root or organisation.parentOrg.parentOrg is the root . The query also contains a number of other predicates and it is built dynamically using

Criteria Query results in a NoResultException instead of returning object

.getCriteriaBuilder(); CriteriaQuery criteria = builder.createQuery(identityClass); Root root = criteria.from(identityClass); criteria.select( root ); List predicates = new ArrayList (); predicates.add(builder.equal(          root .get(identityNameProp.getName()), obj

How to disable use of graphic windows by objectDB

.   [ root @GhostRider bin]# ./objectdb.sh start /usr/bin/sudo -b -u javauser /usr/java/jdk/bin ... .Server -console start [ root @GhostRider bin]# ObjectDB Server started on port 6136.   #The server is running [ root @GhostRider bin]# ps -ax | grep javauser 4238 pts/1    Sl 

jakarta.persistence.criteria.Path.get(String)

to avoid the use of Path variables. For example: CriteriaQuery q = cb.createQuery(Person.class); Root ... "))); rather than: CriteriaQuery q = cb.createQuery(Person.class); Root p = q.from(Person.class); Path nicknames = p

jakarta.persistence.criteria.CriteriaBuilder.sqrt(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression sqrt (    Expression x ) Create an expression that returns the square root of its argument. Parameters: x - expression Returns: square root . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.InheritanceType

together with the root class, and each entity instance is stored as a single table row. The concrete subclass

jakarta.persistence.Inheritance

that is the root of the entity class hierarchy. If the Inheritance annotation is not specified, or

jakarta.persistence.DiscriminatorColumn

for the root of an entity class hierarchy or subhierarchy in which a different inheritance strategy

jakarta.persistence.DiscriminatorValue

and the discriminator column are only specified for the root of an entity class hierarchy or subhierarchy in

jakarta.persistence.EntityManager

primaryKey , FindOption... options ) Find an instance of the root entity of the given EntityGraph by primary

jakarta.persistence.Version

should be declared by the root entity class in an entity class hierarchy, or by one of its mapped

CriteriaQuery .where() for multiple conditions

.where(criteriaBuilder.equal( root .get("name"), name)); criteriaQuery.where(criteriaBuilder.equal( root .get("surname ... (); CriteriaQuery criteriaQuery = criteriaBuilder.createQuery(Person.class); Root root = criteriaQuery.from(Person.class); criteriaQuery.select( root ); Predicate criteria = criteriaBuilder

java.sql.Date equals comparison not working with CriteriaAPI

= ...; Root root = ...; java.sql.Date myDate = ...; Predicate predicate = builder.equal( root ... ; CriteriaQuery q = cb.createQuery(MyDateEntity.class);         Root root = q.from(MyDateEntity.class);         q.select( root );   

Help with JPA2 Criteria and conditional operator grouping

c = builder.createQuery(Company.class);   Root root = c.from(Company.class);   ParameterExpression nameParam = builder.parameter(String.class);   Path namePath = root .get("companyId");   Path conditionOnePath = root .get("conditionOne");   Path conditionTwoPath = root

Problem witch CriteriaBuilder isMember(..)

cb = ... Root root = ... Testclass searchobject = new Testclass(1,2); Predicate predicate = cb.isMember(searchobject, root . get("testlist1")); doesn't work, while String searchobject = "testtext"; Predicate predicate = cb.isMember(searchobject, root . get("testlist2")); works as expected. the equal

Database is erased after deploying a new web application version

to my root directory (and opened all permissions for it) but now there's a problem with accessing ... the full exception error message and stack trace. Failed to open file '/ root /evee-database.odb' at com.webapp ... the "fuser" command as follows: [ root @vmedu158 ~]# ps   PID     TTY 

Soft Reference Object Cache Recommendation

? Can you see a path of strong references from a root that holds that  byte[] from being garbage ... get freed.  Presumably, all items listed therefore have a strong reference path from some root ... dump after commit, clicking right and selecting "Show nearest GC root " results with a VisualVM

ObjectDB CRUD Examples

(); CriteriaQuery criteriaQuery = criteriaBuilder.createQuery(Foo.class); Root root = criteriaQuery.from(Foo.class); List allFoo = (List ) criteriaQuery.select( root ); em.getTransaction().commit(); em.close ... = em.getCriteriaBuilder(); CriteriaQuery criteriaQuery = criteriaBuilder.createQuery(Foo.class); Root

"Unexpected query expression" using CriteriaQuery FetchParent Interface

Using the fetch over Root attribute, the exception is: com.objectdb.o._PersistenceException: Unexpected query expression end (non keyword identifier is expected)] with root cause com.objectdb.o ... ; CriteriaQuery criteriaQuery = cb.createQuery(Person.class);   Root root = criteriaQuery.from(Person

OutOfMemoryError on search after update on DB created with DB Doctor

: [ root @localhost totalrecall]# ls -al db total 1085048 drwxr-xr-x 3 totalrecall totalrecall 4096 Mar ... totalrecall 1339 Feb 19 16:35 objectdb.conf -rw-r--r-- 1 root root 1073741824 Mar 11 12:40 SystemDB.odb -rw-r--r-- 1 root root 214695936 Mar 9 15:16 SystemDB.odb.rpmnew [ root @localhost totalrecall]# 4

Help with 'not like/lower' query

): ParameterExpression stringProp = criteriaBuilder.parameter(String.class); Path path = root .get(property ... .criteria.Path; import javax.persistence.criteria. Root ; public final class ObjectDBTest {    ... ; ParameterExpression stringProp = builder.parameter(String.class);   Root root = c.from(MyEntity.class);  

CriteriaQuery using isNotNull with other conditions results in InternalException

(); CriteriaQuery criteria = builder.createQuery(relationshipClass); Root root = criteria.from(relationshipClass); criteria.select( root ); List predicates = new ArrayList (); predicates.add(builder.equal( root .get("to"), identityObject)); predicates.add(builder.equal( root .get("relationshipType

Date field Index is corrupted due to time change

that running DB Doctor on it shows the following issues: root @localhost totalrecall]# ./dbDoctor.sh db ... running it on the DB file. We get: [ root @localhost totalrecall]# ./dbDoctor.sh db/SystemDB.odb.2.6.5 db ... .6.5 and AEDT time zone: [ root @trvr-200]# uname -a Linux localhost 2.6.32-279.9.1.el6.x86_64 #1 SMP

IN expression in a Criteria Query

is with Criteria Language. This code: In inExpression = cb.in( root .get(Computer_.employeeEntity ... ;      Root root = q.from(MyEntity.class);         Path value = root .get("str");         Predicate predicate

jakarta.persistence.InheritanceType.SINGLE_TABLE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.InheritanceType SINGLE_TABLE A single table for each entity class hierarchy. Subclasses are stored together with the root class, and each entity instance is stored as a single table row. The concrete subclass represented by a row

jakarta.persistence.NamedEntityGraph.name

Jakarta Persistence (JPA) Method in jakarta.persistence.NamedEntityGraph String name (Optional) The name used to identify the entity graph in calls to EntityManager.getEntityGraph . If no name is explicitly specified, the name defaults to the entity name of the annotated root entity. Entity graph

jakarta.persistence.EntityManager.find(EntityGraph,Object,FindOption...)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find (    EntityGraph entityGraph ,    Object primaryKey ,    FindOption... options ) Find an instance of the root entity of the given EntityGraph by primary key, using the specified options

jakarta.persistence.criteria.CriteriaQuery.select(Selection)

and the query result type is specified. For example: CriteriaQuery q = cb.createQuery(String.class); Root

Spring + Maven + persitence.xml

.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) root ... ) root cause com.objectdb.o.InternalException: Unexpected Server Error com.objectdb.o.CLS.T(CLS.java ... ) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) root cause java.lang.NoClassDefFoundError

Connecting to a remote objectdb server

an absolute path (or relative, starting with $objectdb ) for the database root directory. See this manual ... the db files on the root folder of server? I do not see any files in the db folder or directory ... run my app, it created db folder on application root folder and create *.tmp files. Which I believe

How to convert a boolean to an int in the query?

(Integer.class);         Root c = q.from(City.class);     ... = em.getCriteriaBuilder(); CriteriaQuery q = cb.createQuery(Integer.class); Root c = q.from(Person ... = em.getCriteriaBuilder(); CriteriaQuery q = cb.createQuery(Integer.class); Root c = q.from(Person

How to add minutes to a Date with JPA2

= currentTime.getTime(); Expression dateCapture = root .get(Counter_.dateCapture); Expression samplingPeriod = root .get(Counter_.samplingPeriod); Expression delayMinutes = cb.prod(samplingPeriod,3 ... dateCapture = counterJoinValue.get(Value_.dateCapture); Expression samplingPeriod = root .get(Counter

Query in JPA2 with LEFT JOIN on INNER JOIN

actionDescriptionCriteriaQuery = cb.createQuery(String.class);   Root root = cq.from(Action.class); Selection ... = actionDescriptionCriteriaQuery.select( root .get(Action_.description)).getSelection(); selections[0]=actionDescriptionSelection; Predicate masterPredicate = cb.conjunction(); Predicate predicateOnPath = cb.equal( root

JPA CriteriaQuery -- Iterate Expression>

MetaModel Expression records = root .get(Person_.records); Expression param = builder.parameter(String ... record.FIELD LIKE searchString) Path status = root .get("status"); criteriaQuery.where( builder.or( builder.like( root . get("name"), searchString ), builder.like( root . get("second_name"), searchString

Get list of database files

;  File root = Utilities.getServerFileSystem(         ... , password, false); This will return the root directory, which then can be explored further using ... root = Utilities.getServerFileSystem(           

OR not working with isNull

Given the following: Predicate isOwnedByUser = cb.equal( root .get("owner").get("id"), userId); Predicate ownerIsNull = cb.isNull( root .get("owner")); Predicate ownerMatchesOrIsNull = cb.or(ownerIsNull ... OR o.id = :userId Notice that the navigation  root .get("owner").get("id") is implemented as

JPA does not seem to be db agnostic

.class); Root root = query.from(Friendship.class); Path path = root . get("username"); query

Query results are not up to date for entities, not primitives

detail all the code of generic functions, but a piece of logic is this: private void root (Class type) {   Root root = criteriaQuery.from(type); } private void select(Object object) {  

InternalError on multiple AND and JOIN Query

.springframework level set to OFF 09:30:08,930 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - ROOT ... - Attaching appender named [STDOUT] to Logger[ ROOT ] 09:30:08,930 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [SIZE_BASED_ROLLING_APPENDER] to Logger[ ROOT ] Tests run

Object as parameter results in exception

= getEntityManager().getCriteriaBuilder();   CriteriaQuery c = qb.createQuery(managedClass);   Root ... );   Root p = c.from(managedClass);   c.select(p);   c.where(     qb ... = getEntityManager().getCriteriaBuilder();   CriteriaQuery c = qb.createQuery(managedClass);   Root

Time Sequence Object Command DB

; The database can be branched (and forms a tree with the root at the top and leaves at the bottom); the user selects a leaf to load which is linked up to the root and then the DB is loaded from the root

Replaying recorded requests...

the root directory of my web project and now it is being read. So, I think for now I can live with it in 2 locations: project root for development, and WEB-INF/objectdb.conf for deployment. The question

Attempt to begin a new transaction when a transaction is active

._PersistenceException: Attempt to begin a new transaction when a transaction is active root cause com.objectdb.o._PersistenceException: Attempt to begin a new transaction when a transaction is active root cause

ClassCastException in Tuple.get

.createTupleQuery(); Root rootDemandAnswer = cq.from(DemandAnswer.class); Join joinDemand = rootDemandAnswer ... .get(1);   So it seems that Tuple.get chokes on Join, Root and probably other TupleElements ... .get( root ) and Tuple.get(join) with Tuple.get(alias, SelectedEntityType.class) but I'd really love

Strange Error with Criteria API and Sorting

.Join; import javax.persistence.criteria. Root ; public class Test_OrderBy { public static void main ... .createQuery(TestEntity.class);   Root root = query.from(TestEntity.class);   final Join otherJoin = root .join("other");   query.orderBy(cb.asc(cb.upper((Expression ) (Expression ) otherJoin

Logical "or" works not correcly when field is @Id and first position

(Data.class);          Root root = query.from(Data.class);         query.select( root );        ... ;  builder.equal( root .get("a"), "1"),          

Freeze during save

; The loops consisted of references to the root of the tree.   I have managed to code around the problem, by removing the references to the tree root so there were no long loops.  Just an idea ... (); MyNode root = new MyNode(null); MyNode child = new MyNode( root ); MyNode grandchild = new MyNode(child

Best practise loading big data

and paths of strong references from roots to objects? support Support @Entity class MyStepBlockCollection ... ; Here is my debug scenario: I have an existing DB File that contains One single root MyStepBlockCollection ... all entities in the DB if the lists all hold references to the entities. The algorithm just holds the root