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
6
votes
2 answers

How do you use list properties in Google App Engine datastore in Java?

An object to be placed in the datastore will have a set of tags. public class Model { List tagList ... } In Python, the Google App Engine has the notion of list properties. What is the equivalent notion in Java (if it exists)…
onejigtwojig
  • 4,771
  • 9
  • 32
  • 35
6
votes
1 answer

Alternative strategy to query aggregation ("group by") in google app engine datastore

App Engine Datastore cannot be queried for an aggregate result. Example: I have an entity called "Post" with the following fields: Key id, String nickname, String postText, int score I have many different nicknames and many posts by each nickname…
Patrick
  • 1,302
  • 2
  • 13
  • 22
6
votes
1 answer

Where do I set TransactionOptions with JDO / Google App Engine?

I use JDO within GAE to batch persist objects using the following method: public void makePersistent(PersistenceManager pm, List makePersistent) { Transaction tx = pm.currentTransaction(); try { // Start…
Maarten
  • 6,894
  • 7
  • 55
  • 90
6
votes
2 answers

full-text search using Google App Engine and JDO?

I'm using Google App Engine (Java) with JDO. How can I do the JDO equivalent of select * from table where field like '%foo%' The only recommendation I have seen so far is to use Lucene. I'm kind of surprised that something this basic is not…
George Armhold
  • 30,824
  • 50
  • 153
  • 232
6
votes
3 answers

How does ORM work under the covers? Also what is the best way to have persistent objects in Java?

How does ORM work? Are objects serialized into BLOBs? In Java, is JDO still the way to go for this? What else is available? Seems like there was a lot of talk of EJB, direct object serialization, and JDO.
DevDevDev
  • 5,107
  • 7
  • 55
  • 87
6
votes
1 answer

Unit Testing XG Cross Group Transaction in App Engine Java JDO

I have a cross group transaction in app engine java jdo. It works great on the local dev app engine server. However, from unit testing, I get a java.lang.IllegalArgumentException: transactions on multiple entity groups only allowed in High…
Patrick
  • 1,302
  • 2
  • 13
  • 22
6
votes
5 answers

Datanucleus, JDO and executable jar - how to do it?

I am developing a desktop app with Datanucleus and JDO for embedded H2 database. It all works fine when I run it from Eclipse, but it stops working when I try to make executable jar out of it. I get a following…
Paul
  • 389
  • 3
  • 11
5
votes
3 answers

Error HBASE-ZOOKEEPER : Too many connections

I am using Hbase-Hadoop combination for my application along with Data Nucleus as the ORM. When I am trying to access Hbase via several threads at a single time, it throws exceptions as: Exception in thread "Thread-26"…
devsri
  • 6,173
  • 5
  • 32
  • 40
5
votes
3 answers

App-Engine JDO consistent reading not working, maybe caching?

Today it's the first time I'm using GWT and JDO. I am running it with Eclipse in the local debug mode. I do the following thing: public Collection add(MyObject o) { PersistenceManager pm = PMF.get().getPersistenceManager(); try { …
Franz Kafka
  • 10,623
  • 20
  • 93
  • 149
5
votes
1 answer

Key or Long for ID in Google App Engine (JDO)

I'm using JDO with Google App Engine for storage and I'm wondering what is the difference between the Key object and Long for id? I find the long ID more practical, am I missing anything? Thanks.
Elie
  • 6,915
  • 7
  • 31
  • 35
5
votes
1 answer

How to use JDO persistence manager?

I have two questions regarding how to create / use the JDO persistence manager (PM, hereafter). Say, in a Java web application, if I have 10 entities, which can be logically grouped into 2 groups (for example, 5 user related entities and 5 business…
Veera
  • 32,532
  • 36
  • 98
  • 137
5
votes
2 answers

XSD Schema - JAXB marshaling - Datastore(JPA/JDO) Roundtrip

I'm trying to find a way to accomplish a xsd schema to datastore roundtrip, with minimum effort. I used jaxb to build my object model from schemas, now I would like to store these objects based on JPA (or JDO or something else?). Is it possible, to…
joecks
  • 4,539
  • 37
  • 48
5
votes
2 answers

How do I annotate a collection of embedded objects in Google App Engine (Java)?

Is it possible to store a collection of embedded classes in Google App Engine (Java)? If so, how would I annotate it? This is my class: @PersistenceCapable public class Employee { @PrimaryKey @Persistent(valueStrategy =…
Cameron
  • 51
  • 2
5
votes
3 answers

JDO Exception: "Query requires 1 parameters, yet 2 values have been provided."

Despite the fact that my JDO query contains TWO declareParameters statements, the code below produces an error claiming only one parameter is accepted: Query requires 1 parameters, yet 2 values have been provided. The two parameters are amountP and…
Uro
  • 183
  • 4
  • 8
5
votes
1 answer

Keeping a JDO persistence manager alive instead of closing it?

Does a persistence manager generally need to be closed? Can you just keep one open and re-use it all the time, ie just repeat this pattern: Transaction tx = pm.currentTransaction(); try { tx.begin(); // do stuff tx.commit(); } finally { …
Jay
  • 19,649
  • 38
  • 121
  • 184
1 2
3
76 77