jdo

Hibernate vs JPA vs JDO - pros and cons of each?

I'm familiar with ORM as a concept, and I've even used nHibernate several years ago for a .NET project; however, I haven't kept up with the topic of ORM in Java and haven't had a chance to use any of these tools. But, now I may have the chance to begin to use some ORM tools for one of our applications, in an attempt to move away from a ...

Persist java.util.Properties as serialized object using JDO/DataNucleus

The Google AppEngine docs say that I can persist serializable objects using JDO like so import javax.jdo.annotations.Persistent; import DownloadableFile; // ... @Persistent(serialized = "true") private DownloadableFile file; but if I use it with Properties @Persistent(serialized="true") private Properties initProps; I get Data...

[Java] JDO - Updating an Object

Hi, i am experimenting with the Google App Engine, and the persist option JDO. I would like to know if it is possible to map a transient object to a persist object? Or something to update the persistent object with the use of an transient object? I the coding examples i see the following piece of code to update objects: public void u...

DataNucleus: How do I automatically perform actions when commiting a transaction?

Consider having an application using DataNucleus with the following persistence structure: You have a class that has two attributes like created (Date) and lastUpdate (Date): How do you automatically fill those attributes with the appropriate values when an object of this class is going to be committed? Appropriate values would be sett...

JPOX JDO and Castor JDO compared to Hibernate persistence

Do these frameworks (JPOX JDO and Cater JDO) work off similar principles as Hibernate? Do they use configuration data plus a combination of reflection and generics? What are some of the major architectural differences? ...

Are there have any tools to mapping data classes (JDO) from sql server database?

I'm trying with google AppEngine, i need a tool can mapping data classes (JDO) from sql server database ...

Detached Objects in Jdo/Hibernate - What are they for anyway?

Can some explain to me what is the advantage of using detached objects within the context of a web application? AFAIK they are only useful if the objects somehow outlive the "lexical" scope of the transaction, but typically in a web app when your transaction is over you just send your objects to the view layer, and they will not be reatt...

Google Datastore problem with query on *User* type

On this question I solved the problem of querying Google Datastore to retrieve stuff by user (com.google.appengine.api.users.User) like this: User user = userService.getCurrentUser(); String select_query = "select from " + Greeting.class.getName(); Query query = pm.newQuery(select_query); query.setFilter("author == paramAuthor"); que...

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 <=paramEndDate "); // declare params used above query.declareParameters("com.google.appeng...

Java AppEngine: JDO or JPA, How to choose??

Pros and Cons of choosing JDO or JPA for a Grails Application that will run on Google AppEngine ...

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 desc"); try { results = (ArrayList<App>) q.execute(); } finally { q.closeAll(); } } finally {...

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 both the parent (employee) and child (Contact) and then call makePersistent. But if I try ...

Sending persisted JDO instances over GWT-RPC

I've just started learning Google Web Toolkit and finished writing the Stock Watcher tutorial app. Is my thinking correct that if one wants to persist a business object (like a Stock) using JDO and send it back and forth to/from the client over RPC then one has to create two separate classes for that object: One with the JDO annotations...

Problems with owned one to one relationships and parent/child relationships

I have three entities User, Company, and Address with declarations like so: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class User implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent(mappedBy="creator") @Order(extensions = @Extens...

Google DataStore Query Set

I have a Course entity which contains a Set of Keys to my Tag entity. How would I go about creating a query to get a list of courses with a specific tag? For example, I want to find all the courses tagged with java. Here are my entities: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class Cou...

Best Persistence API for use with GWT

What is the best persistence API for use with GWT? Sadly, the application will be hosted on my own java server, as I will need more control than GAE will give me. I know I will need to have two sets of my entities, one for the server side, and some pojo's for the client side. I'm looking to make the mapping of the data as simple as...

How to add a child object to a parent with App Engine?

I have two classes in an owned one-to-many relationship. The parent is Map, and the child is POI (point of interest). I am trying to add a POI to an existing Map, but I get an exception when I try to persist my changes. Here are the two classes: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Map { @Primar...

Using JDOQL results in Scala

I'm trying to use a JDO with Google App Engine and Scala. The api for the execute returns Object (but it's really a java collection) and I want to get it into a scala list to iterate over it. My code looks like this so far: val pm = PMF.factory.getPersistenceManager val query = "select from User " val gamelist:List[User] = List(pm.ne...

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. ...

jdo integration with spring..?

is it a must to use kodo jdo if want to integrate with spring? from my understanding kodo is not free. any free implementation of jdo with spring? any such demo come with source code? ...