Questions tagged [jdoql]

JDOQL is the query language of the JDO persistence API. JDOQL is designed as the Java developers way of having the power of SQL queries, yet retaining the Java object relationship that exist in their application model.

JDOQL is the query language of the JDO persistence API. JDOQL is designed as the Java developers way of having the power of SQL queries, yet retaining the Java object relationship that exist in their application model.

84 questions
0
votes
1 answer

JDO Delete parent row without deleting the children rows

I need a bit of help trying to delete a row from the parent table but without deleting the children. I have this table MyEntityA. That has 2 foreign keys to table MyEntityB like: @PersistenceCapable(detachable = "true") public class MyEntityA…
0
votes
1 answer

Google App Engine Queries with JDOQL, how to just get a count?

I've used "select from X.class.getName()" to get all records of class X, but if there is a lot of records, it might take a long time to get the results. I just want a count of how many records are there in the Datastore, what's the fastest query to…
Frank
  • 30,590
  • 58
  • 161
  • 244
0
votes
1 answer

How to do a Date range query using JDO on Google App Engine

Here is the code snippet I am trying to get to work: final Query query = pm.newQuery("SELECT FROM model.Strip WHERE publishOn <= startDate && endDate >= publishOn PARAMETERS Date startDate, Date endDate import java.util.Date"); Since I am only…
user177800
0
votes
1 answer

JDO query using the object ID

I have a User object which has a collection of Transaction objects under it. I store the object ID for my User object and now need a query to sum the transactions under the User object: @Persistable public class User { private String…
David Parks
  • 30,789
  • 47
  • 185
  • 328
0
votes
0 answers

How to fetch data as parent from child object with one to many relation in JDO query in Google cloud datastore?

I have two tables 1-Employee & 2- LogHistory Employee has child as LogHistory There are lots of entries against for one employee in LogHistory Employe has properties employeeId, name, email and LogHistory list. LogHistory has properties…
Ashraf
  • 135
  • 10
0
votes
1 answer

JDO querys with OR in GAE

Got an entity A with like this public class A private String a; private String b; .. .. .. How do I write a JDO query that select all the A objects that matches either keyword==a OR keyword ==b Full code looks something like this: Query q =…
Andreas Blomqvist
  • 437
  • 1
  • 9
  • 22
0
votes
1 answer

Queries with JDOQL Unique Result Set

In my GAE application I want to make a JDOQL which returns a List where every element exist at most once even in the database there are more. How can I do this?
metdos
  • 13,411
  • 17
  • 77
  • 120
0
votes
1 answer

JDOQL subqueries - Class name _ could not be resolved

I'm new to JDOQL and I'm having troubles with the below. I'm trying to get the average salary for the department and then select the departments where the average salary is higher than a certain value. Query averageSalaryByDep =…
Joanna
  • 54
  • 1
  • 1
  • 7
0
votes
0 answers

How to fetch related object using JDOQL named query?

I'm using DataNucleus 2.0.5. And I need to run named JDOQL query to retrieve object with some of related entities. Suppose I have class Account{ Set roles; //... other properties } Now I want to execute named query and retrieve…
Taras Boychuk
  • 2,059
  • 13
  • 21
0
votes
1 answer

What is the best way to get multiple objects using a List of Keys on Google App Engine (Java)?

I have a many-to-many relationship. Just like in the example from the documentation: Person.java private Set favoriteFoods; Food.java private Set foodFans; How do I get all "favorite foods" of a certain "food fan", if i have…
0
votes
1 answer

Using the 'INTO' keyword in JDOQL with GAE

I have a persistent class, 'Meeting' that has a 'minute' and 'hour' field among others. I only need these two fields to populate a dropdown in my ui. The example I found tells me that I can create a simple bean that would house just these two fields…
emooney
  • 23
  • 5
0
votes
1 answer

Rounding a value in JDOQL

I've got data in the GAE data store. I want to write a JDOQL against that data that takes one of the columns and rounds the value of it. Can I do this?
Matthew Bonig
  • 2,001
  • 2
  • 20
  • 40
0
votes
1 answer

Excluding properties when persisting unowned entity relation jdo (gae)

In a Google App Engine app, I have this model: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Message { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent …
oyvindhauge
  • 3,496
  • 2
  • 29
  • 45
0
votes
1 answer

How to query for an interface and filter the resultset with JDOQL?

I have an interface @PersistenceCapable public interface MyInterface { public abstract String getName(); public abstract void setName(String name); } The persistence layer uses JDO. The JDO implementation is DataNucleus. Now I want to…
PageFault
  • 289
  • 1
  • 4
  • 15
0
votes
1 answer

How can I use DataNucleus JDOQL API to Query Object within Collection?

I'm trying to figure out how to query an object within a collection of persistent objects using an RDBMS and DataNucleus. I've got a User, an ObjectAttribute, and an ObjectAttributeDefinition. The User may have more than one ObjectAttribute, and…
moscro
  • 486
  • 5
  • 13