JDODataNucleus « jdo « Java Enterprise Q&A





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

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

2. What is the meaning of an "attached" object in JDO/DataNucleus?    stackoverflow.com

The DataNucleus docs talk a lot about detached objects and what it means to be detached, but, for new users, they kind of skip over the simplistic: What does it mean ...

3. When I call setResultClass(...) in JDO/DataNucleus for an aggregate function JDOUserException is thrown    stackoverflow.com

With the following code

    Query query = pm.newQuery(User.class);
    query.setFilter( "username == :usernameParam" );
    query.setResult( "count(username)" );
    query.setResultClass(Long.class);
   ...

4. Persisting interfaces using JDO/Datanucleus    stackoverflow.com

I have the following class:

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class TclRequest implements Comparable<TclRequest> {
    @PrimaryKey
    private String id;

    @Persistent(types = { ...