About named queries

forum_thread

Object as parameter results in exception

Hi,    I've got a simple JPA2 Criteria query which fails when doing an object equality. I verified this against EclipseLink and over there, it works. I'll Attach some code snippets to help figure it out:   @Entity() public class Product{ . . . @ManyToOne     private Compamy owningCompany; } @Entity() public class Company{    .    .    .     @Id    private Long id; } and the query: ... cache cannot be used. Maybe ObjectDB should optimize such queries replacing literals with parameters automatically, whenever possible. ... are a pretty bad idea! Most of our queries will still be named queries, just our 'search' queries will be coded as Criteria ...

 
forum_thread

Help with JPA2 Criteria and conditional operator grouping

Hi,   I'm getting a little trouble performing a query as per the way I had it set up on eclipselink. Essentially, the query I'm trying to generate is: SELECT $1 FROM Company $1 WHERE (($1.companyId=:p1) AND ($1.conditionOne=true)) AND (($1.conditionTwo=false) OR ($1.conditionThree=false))   From the JPA2 criteria: #1 2011-07-13 13:51 Hi,   I'm getting a little trouble performing a query as per the way I had it set up on eclipsel ...

 
forum_thread

Criteria Query results in a NoResultException instead of returning object

When I run the following code    ... improve performance and to make using entity objects in queries easier). Please try build 2.4.4_04 that should fix this ...

 
forum_thread

Query for objects persisted within the same transaction

I have a question concerning reading uncommited entities with query, within active transaction. For example, I read data from file. Each line contains value of one of entity's attributes but those values are not unique, so it's possible to have a multiple instances of the same entity. To eliminate duplicates, after reading every line I first check using a query, if an entity with that attribute value already exists. If no - I create one and persist it.... withing current transaction is invisible to future queries in this transaction, unless I do commit. The ugly solution is to use ...

 
api-jpa

javax.persistence.criteria.From

Represents a bound type, usually an entity that appears in the from clause, but may also be an embeddable belonging to an entity in the from clause.(Interface of JPA)

 
api-jpa

javax.persistence.criteria.Join

A join to an entity, embeddable, or basic type.(Interface of JPA)

 
forum_thread

Unable to execute update query

Hello! I'm trying to do an update query via the explorer to set a new field value for around 400k objects. UPDATE Position p SET p.originalData = null This exception raises when I try to do it: ... issue #255 is now (in build 2.6.6_04) extended to update queries. See issue #255 posts 10 and 28 regarding how to enable it. ...

 
api-jpa

javax.persistence.criteria.ListJoin

The ListJoin interface is the type of the result of joining to a collection over an association or element collection that has been specified as a java.util.List.(Interface of JPA)

 
forum_thread

Restrict by class in query

I have the following bit of code: #1 2012-06-01 22:09 I have the following bit of code: public List<Folder> findFolderByName ( String folderName ...

 
api-jpa

javax.persistence.criteria.MapJoin

The MapJoin interface is the type of the result of joining to a collection over an association or element collection that has been specified as a java.util.Map.(Interface of JPA)