jdo

What does setting SubclassFetchMode (Kodo OpenJPA) actually do?

What does setting SubClassFetchMode e.g. to EAGER_PARALLEL actually do? Why would one want a subclass to have a different FetchMode? The implementation spec for KODO and OpenJPA is notoriously bad and I can't figure it out. ...

Problems Mapping a List of Serializable Objets with JDO

I have two classes Invoice and InvoiceItem. I would like Invoice to have a List of InvoiceItem Objets. I have red that the list must be of primitive or serializable objects. I have made InvoiceItem Serializable. Invoice.java looks like import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.jdo.annotatio...

unable to add objects to saved collection in GAE using JDO

I have a ClassA containing an ArrayList of another ClassB I can save a new instance of ClassA with ClassB instances also saved using JDO. However, When I retrieve the instance of Class A, I try to do like the below: ClassA instance = PMF.get().getPersistenceManager().GetObjectByID( someid ); instance.GetClassBArrayList().add( new Clas...

How can I create a user registration form using datastore - google appengine ??

I am very new to jsp and google appengine , but still I can do something if I get some basic idea , I wanna create an user registration form with fields like name, user id , password, confirm password, etc,. using google appengine datastore feature. and I wanna retrieve user information . Please help me .. Thanks in advance. Thanks f...

KODO: how set up fetch plan for bidirectional relationships?

Running KODO 4.2 and having an issue inefficient queries being generated by KODO. This happens when fetching an object that contains a collection where that collection has a bidrectional relationship back to the first object. Class Classroom { List<Student> _students; } Class Student { Classroom _classroom; } If we create...

Google app engine: Poor Performance with JDO + Datastore

I have a simple data model that includes USERS: store basic information (key, name, phone # etc) RELATIONS: describe, e.g. a friendship between two users (supplying a relationship_type + two user keys) COMMENTS: posted by users (key, comment text, user_id) I'm getting very poor performance, for instance, if I try to print the firs...

Google Datastore w/ JDO: Access Times?

I'm hitting what appears (to me) strange behavior when I pull data from the google datastore over JDO. In particular, the query executes quickly (say 100 ms), but finding the size of the resulting List<> takes about one second! Indeed, whatever operation I try to perform on the resulting list takes about a second. Has anybody seen this...

Subqueries on Java GAE Datastore

I am trying to create a database of users with connection between users (friends list). There are 2 main tables: UserEntity (main field id) and FriendEntity with fields: - initiatorId - id of user who initiated the friendship - friendId - id of user who has been invited. Now I am trying to fetch all friends of one particular user and ...

Where to declare JDO Singleton PersistenceManagerFactory with multiple services

Hello, I am working with GWT and have 4 Service Implementations that need a PersistenceManagerFactory. I followed Google's advice on creating a singleton class, however I am unsure of where this class should be instantiated and referenced from in the server-side code. The class looks like this import javax.jdo.JDOHelper; import javax....

Google App Engine JDO how to define instance fields ?

I have a class like this : import java.io.*; import java.util.*; public class Contact_Info_Entry implements Serializable { public static final long serialVersionUID=26362862L; String Contact_Id,First_Name="",Last_Name="",Company_Name="",Branch_Name="",Address_1="",Address_2="",City="",State="",Zip="",Country="",E_Mail="",Phone; i...

Why "import javax.jdo.* "caused error ?

I have a class uses the following lines, it works fine in a Google App Engine project: import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; But when I included this ...

Google App Engine JDO error caused by GregorianCalendar ?

My class looks like this : import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable(identityType=IdentityType.APPLICATION) public class Contact_Info i...

App Engine - Query using a class member as parameter

I have a simple class, relevant details below: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class SimpleCategory implements Serializable{ ... public static enum type{ Course, Category, Cuisine } @Persistent public type t; ... } I am attempting to query all SimpleCategory objects of the same type. pu...

Unable to persist objects in GAE JDO

Hello Guys, 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 problem: (Slightly simplified, but still contains all the info necessary) My data...

AppEngine JDO-QL : Problem with multiple AND and OR in query

Hi, I'm working with App Engine(Java/JDO) and are trying to do some querying with lists. So I have the following class: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class MyEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) Key key; @Persistent List<Strin...

Java: JDOQL startsWith query, case sensitive

I'm using the .startsWith() filter in a JDOQL query but it's case sensitive. So startsWith("ab") doesn't return "Abc" result and so on. Will I need to use a SQL query to avoid this ? ...

Implementing tagging in JDO

I am implementing a tagging system for a website that uses JDO . I would like to use this method. However I am new to relationships in JDO. To keep it simple, what I have looks like this: @PersistentCapable class Post { @Persistent String title; @Persistent String body; } @PersistentCapable class Tag { @Persistent String name; } Wha...

How the existing data to be if entity structure modified or deleted on GAE?

GAE recommends using JDO/JPA. But I have serious question about using OODB like them. JDO based on user's class structure. And data structure should be modified continually as service advances. So, If data(entity) class property being removed, what happened to existing data on the property? If data(entity) class renamed for refactoring...

Declarative JDOQL vs Single-String JDOQL : performance

When querying with JDOQL is there a performance difference between using the declarative version and the Single-String version: Example from the JDOQL doc: //Declarative JDOQL : Query q = pm.newQuery(org.jpox.Person.class, "lastName == \"Jones\" && age < age_limit"); q.declareParameters("double age_limit"); List results = (List)q.execu...

Eager fetching of children with JDO (Datanucleus)

Hi, can JDO fetch all children of a database model at once? Like: class Parent { @Persistent(mappedBy="parent") private Set<Children> children; } class Children { @Persistent private Parent parent; @Persistent private String name; } In my case, I have a large number of Parents which I fetch at once. Accessing their children t...