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...
I am using JDO or JPA on GAE plugin in Eclipse.
I am using smartgwt datasource, accepting an xsd.
I would like to be educated how to generate an XSD from my jdo/jpa entity, vice versa.
Is there a tool to do it?
While datanucleas does all its magic enhancing in the Eclipse background, would I be able to somehow operate in a mode that w...
I am using datanucleus and jdo in a GWT project. How can I retrieve the generated primary key after adding an element to the database with makePersistent()
Edit
We use annotations, here is the primary key:
@PrimaryKey
@Column(name = "id_bla", allowsNull = "false")
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, extensions...
Getting a weird error on java appengine code that used to work fine (nothing has changed but the data in the datastore).
I'm trying to iterate over the results of a query and change a few properties of the entities. The query does return a set of results, however, when I try to access the first result in the list, it throws an exceptio...
I'm getting following error when I run my app on eclipse development enviroment, but when I deploy app to appengine it works fine. Is it possible to get this work in development enviroment?
HTTP ERROR 500
Problem accessing /my-controller/. Reason:
(class: org/datanucleus/TransactionImpl, method: internalPreRollback signature: ()V)...
I'm experimenting with moving a JDBC webapp to JDO DataNucleus 2.1.1.
Assume I have some classes that look something like this:
public class Position {
private Integer id;
private String title;
}
public class Employee {
private Integer id;
private String name;
private Position position;
}
The contents of the Position SQL table really...
hello all!
I tried running the sample GWT/Google Appengine application - expenses generated by ROO using the roo command "script expenses.roo" (as advised here)...
This app uses datanucleus-core - 1.1.6 and a HSQLDB as the in-memory database.
I was able to run the application and successfully store and retrieve Employee objects. (Thes...
Hi all,
I've been trying to create a single project which can run both on sql and gae (where the 'datanucleus.properties' file needs to be changed) under a single maven folder structure. I first tried to get the Greeting example on the GAE website using mysql (this now works). Then, inspiring myself from beardedgeeks tutorial, I have tr...
I'm trying to insert an Employee object into the database using DataNucleus 2.1.1, but the foreign-key Position parameter is not being set before the "insert" prepared statement is executed. What am I doing that prevents the parameter from being set? Am I leaving something out? Reading works fine.
DEBUG [DataNucleus.Datastore.Native]...
Hi everybody,
Exception in thread "main" Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/home/zakaria/.m2/repository/org/datanucleus/datanucleus-core/1.1.6/datanucleus-core-1.1.6.jar" is already registered, and you are trying to regis...
Does DataNucleus support Cache Coordination? If yes, how can I enable and use it?
I'm not actively using DataNucleus yet, but I want to consider it, if it supports Cache Coordination.
Background: Cache coordination is used by multiple cache instances to inform each other about changed entities (e. g. via JMS or RMI). Its purpose is to ...
I would like to select a list of results from a database, but the == operator for JDO queries is case-sensitive. Is there a way to select "USER", "user", and "User" from a table using a single parameter?
In MySQL you have the LIKE operator, and in Java the equalsIgnoreCase function. However, neither of them work in this example.
Persis...
Hey,
I'm experimenting a bit with google app engine and the lack of a transaction di framework is missing. I'm implementing it as good as I can, but I'm hitting the same exception again and again:
can't operate on multiple entity groups in a single transaction. found both Element...
I have read the documentation (http://code.google.com/...
Is there a way to specify using JPA that there should be multiple unique constraints on different sets of columns?
@Entity
@Table(name="person",
uniqueConstraints=@UniqueConstraint(columnNames={"code", "uid"}))
public class Person {
// Unique on code and uid
public String code;
public String uid;
// Unique on us...
How do you define a field, ie email as having an index using JPA annotations. We need a non-unique key on email because there are literally millions of queries on this field per day, and its a bit slow without the key.
@Entity
@Table(name="person",
uniqueConstraints=@UniqueConstraint(columnNames={"code", "uid"}))
public class Pe...
It turns out that the following example works when using mysql 5.x, however it doesnt when using an oracle 10g database.
Is there a way to define a unique identifier field that is independant of the database technology?
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="id")
private long id;
I have tested this in h...
Query q = em.createQuery("SELECT u FROM SSUser u WHERE u.emailId=?1")
.setParameter(1, email);
I thought this would be a valid query, but then I get:
No results for query: SELECT FROM SSUser u WHERE u.emailId=?1
What's the right way to express this query?
...
Hello there! =)
I created an application using GWT and support for the Google Datastore but now i'm trying to move my application to my own server and i'm also trying to detach my app from Google App Engine and from Datastore.
To be more precise: I want to stop using Google Datastore and start using JDO and Datanucleus but with Postgre...
I have a model which contains a java.util.Set object as a member. How do I persist this using JDO? Specifically, how do I define the XML in the .jdo file?
class MyClass {
Set<String> data;
private MyClass() {
}
}
...
Hey!
I've set up a small project using apache.JDO /w DataNucleus. I can save data w/o any problems, but I got stuck when trying to update or delete them.
The scenario is the following:
I create an object & persist it, it gets and id
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private...