Questions tagged [jdo]

Java Data Objects (JDO) is a standard way to access persistent data in databases, using plain old Java objects (POJO) to represent persistent data. It is designed to be datastore-agnostic, allowing persistence to, potentially, any type of datastore

Java Data Objects (JDO) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a datastore. JDO 1.0 (2002) defined the basic API, JDO 2.0 (2006) included a comprehensive definition of ORM as well as other enhancements, and JDO 3.0 (2009) added on annotations, as well as APIs for fetch groups and metadata. It is the most complete specification for Java persistence around

1151 questions
5
votes
2 answers

Transactions over very very large entity group

I am trying to design a data model which can hold a very large amount of data, does anyone with experience in large volumes of data have any feedback on this, ie: // example only, not meant to compile public class TransactionAccount { private…
Jay
  • 19,649
  • 38
  • 121
  • 184
5
votes
3 answers

How do you make query results available after closing the persistence manager

I am learning GAE and am getting a bit stuck. If I use the following, with a finally to make sure the persistence manager is closed, I get an exception when trying to actually read the Note objects: public class Notes { public List
Jay
  • 19,649
  • 38
  • 121
  • 184
5
votes
2 answers

Unable to persist objects in GAE JDO

I am completely fresh to both JDO and GAE, and have been struggling to get my data layer to persist any code at all! The issues I am facing may be very simple, but I just cant seem to find any a way no matter what solution I try. Firstly the…
Basil Dsouza
  • 160
  • 1
  • 10
5
votes
1 answer

Maven building for GoogleAppEngine, forced to include JDO libraries?

I'm trying to build my application for GoogleAppEngine using maven. I've added the following to my pom which should "enhance" my classes after building, as suggested on the DataNucleus documentation
Jimmy
  • 16,123
  • 39
  • 133
  • 213
5
votes
2 answers

Appengine jdoconfig.xml for local database

Has anyone successfully configured JDO datanucleus default to google app engine to work on a local database? Why am I always getting an error in jdoconfig.xml when I have specified the property "datanucleus.storeManagerType" with value "rdbms." at…
ivanceras
  • 1,415
  • 3
  • 17
  • 28
5
votes
3 answers

getObjectsById on App Engine

According to JDO, you can use PersistenceManager.getObjectsById to load multiple entity instances by their object id. What kind of Collection does one need to use here? A Google Data Store Key does not work as object id.
Thilo
  • 257,207
  • 101
  • 511
  • 656
5
votes
2 answers

Gae Jdo persistance on one-to-many owned relationship with bidirectional navigation

I'm trying to persist a one-to-many owned relationship with bidirectional navigation in GAE using JDO. I manually add the Contact to User class, and I would expect that in the end the Contact will have a reference to the parent User object. If I…
raisercostin
  • 8,777
  • 5
  • 67
  • 76
5
votes
1 answer

JDO for Google App Engine: escaping quotes

How do I escape parameters of queries in JDO (Google App Engine)? For example, how do I make the next snippet safe, if the variable name may contain unsafe chars as single quotes (') PersistenceManager pm = ...; String query = "select from Person…
flybywire
  • 261,858
  • 191
  • 397
  • 503
5
votes
2 answers

App Engine, JDO and Maven. Error on startup

I'm trying to create a simple test using JDO with App Engine and a Maven configuration. My compile and data enhancement steps succeed. But at runtime (both mvn:test and appengine:devserver) I get: 1) Error in custom provider,…
rsb
  • 1,020
  • 1
  • 10
  • 25
5
votes
1 answer

How can I optimize an AppEngine Java/JDO datastore put() to use less writes

I'm tuning an app we run on App Engine and one of the largest costs is data store reads and writes. I have noticed one of the biggest offenders of the writes is when we persist an order. Basic data is Order has many items - we store both separately…
Ashley Schroder
  • 3,826
  • 1
  • 21
  • 16
5
votes
1 answer

Datanucleus gae.pk-id not populated on makePersistent

When I make a class that defines both "gae.encoded-pk" and "gae.pk-id" persistent, the encoded-pk is updated, but the id remains null. There's no exception being thrown and the code is a straight copy paste from google's documentation, so I'm at a…
5
votes
3 answers

ClassCastException when trying to add child to parent in owned one to many. (using jdo on google appengine)

I need some help figuring out what I'm doing wrong here. I am trying to master one to many relationships and running into a roadblock. I tried to modify the Employee and ContactInfo example to do one to many mappings: Everything works if I create…
Peter Recore
  • 14,037
  • 4
  • 42
  • 62
5
votes
1 answer

Embedded JDO Field is not Retrieved by Query

I am using the local-development version of App Engine's JDO implementation. When I query an object that has contains other objects as embedded fields, the embedded fields are returned as null. For example, lets say this is the main object that I…
Chania
  • 307
  • 3
  • 14
5
votes
1 answer

Why am I getting a cast error in my Query using JDO on Google App Engine?

According to the Queries and Indexes doc you can go a query effectively identically (so far as I can tell) to this: PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(App.class); q.setOrdering("name…
Jeremy Logan
  • 47,151
  • 38
  • 123
  • 143
4
votes
1 answer

How to dynamically build JDO Queries on multiple parameters

One can easily use JDO syntax to query on multiple parameters as follows: //specify the persistent entity you're querying and you filter usign params query = pm.newQuery(MyClass.class, " customer == paramCustomer && date >= paramStartDate && date…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242