About TypedQuery

forum_thread

Error using query with MAX() function

I have a class that is persisting a Entity that holds remarks and a time. Then when I query for the latest remark I get a internal error when the remark is larger than 1966 chars. Here is a test class and entity that reproduces the problem on my system. ... q. where ( predicate ) ;   TypedQuery<Object> tq = em. createQuery ( s ) ; ...

 
forum_thread

Error 363 - Failed to read value of inverse relationship

I've got two objects: @Entity public class EEvent { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @ManyToOne(optional=false) private ETown town; public ETown getTown() { return town; } public void setTown(ETown town) { this.town = town; } } And: ... null ; try { TypedQuery<Player> query = getEntityManager ( ) . ... null ; try { TypedQuery<Player> query = db. createQuery ( "SELECT p ...

 
forum_thread

Updating Entities

Hello, I'm currently writing a program using JavaFX and ObjectDB and I'm encountering a problem with Entities not sending their updates to each other. I have two Entities in question at the moment: Employee and Paygrade. ... " \t newRate: " + newRate ) ;   TypedQuery<Paygrade> query = Main. paygradeDB . createQuery ... ORDER BY rate" , Paygrade. class ) ; TypedQuery<Paygrade> modifyTo = Main. paygradeDB . createQuery ...

 
issue

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open the Database (with ObjectDB-Explorer) we get a "Failed to generate dynamic type ..."   Small Example: Generate Database ... try to ecexute a Query (in the second main method): TypedQuery<RenamedSuperClass> q = em. createQuery ( ...

 
tutorial

Step 3: Add a Main Class

Explains how to add the JPA tutorial Main class in Eclipse.... all the Point objects from the database: TypedQuery<Point> query = em. createQuery ( ...

 
tutorial

Step 3: Add a Main Class

Explains how to add the JPA tutorial Main class in NetBeans.... all the Point objects from the database: TypedQuery<Point> query =  em. createQuery ( ...

 
forum_thread

Memory leak with OutOfMemoryError exception

Hi, I'm new to using object databases. Currently I'm experience the following error: ... . createEntityManager ( ) ;   TypedQuery<DailyEntry> q = em. createQuery ( "SELECT d ...

 
forum_thread

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open the Database (with ObjectDB-Explorer) we get a "Failed to generate dynamic type ..."   Small Example: Generate Database ... try to ecexute a Query (in the second main method): TypedQuery<RenamedSuperClass> q = em. createQuery ( ...

 
forum_thread

Failed to write the value of field using reflection (error 363) on LAZY fetch

Hi There I am using ObjectDB 2.6.3. I get the following Exception when I try to read my entities with a query where I have set to use LAZY initalization. It fails when it tries to set a 1:n member (e.g. a Modell has several Artikels) . When I remove the LAZY hint on the query execution it works. Any hints why this can happen? The Mapping of class Modell and its member: ... ( Class<T> classEntity ) { TypedQuery<T> query = getEntityManager ( ) . ...

 
forum_thread

Query in JPA2 with LEFT JOIN on INNER JOIN

select a.description, a.id, p1.description, p2.description,p3.description from action a left join action_profile ap1 on ap1.id_action=a.id inner join profile p1 on  ap1.id_profile=p1.id  and p1.name='?' left join action_profile ap2 on ap2.id_action=a.id inner join profile p2 on  ap2.id_profile=p2.id  and p2.name='?' where a.id =?;   Thanks   ... masterPredicate ) ;   TypedQuery<ActionProfileAdminAdvancedResponse_> query = ...