cayenne

Cayenne null pointer error when trying to commit changes

I'm running the following code that errors when I try to commit my changes using Cayenne as my ORM. The code is pasted below and errors out on the context.commitChanges();line. The output messages are pasted below the code. Any help on figuring this out would be appreciated. import org.apache.cayenne.access.DataContext; import java...

Binding a list of integers in an IN clause using Cayenne

I'm trying to bind a list of integers into an SQLTemplate IN clause like so: SELECT * FROM table1 WHERE id IN ( #bind($idList) ); I have a string of ids: idList = "1, 2, 3, 4"; I can't get the bind to work successfully, it returns no values when I pass in the string as a list of ids to check. I'm having to use string concatenation...

Unable to connect to mysql server on line context.commitChanges() when using Cayenne

I'm trying to run this code--> import org.apache.cayenne.ObjectContext; import org.apache.cayenne.access.DataContext; public class Main { /** * @param args */ public static void main(String[] args) { ObjectContext context = DataContext.createDataContext(); EmployeeInfo empInfo = (EmployeeInfo)context.newObject(EmployeeInfo.cl...

Is cayenne good choice for my requirement?

We are evaluating ORM solutions for my project that has tight coupling between business layer and datalayer(JDBC). I started doing a PoC with Cayenne. My requirement goes like this a) Already there exists database schema b) Schema is very granular level. I.e. real time java objects are only derived by combining tables. c) At the moment I...

issue with Cayenne Entity Manager

Hi, I'm trying to persist an object into the database using Cayenne Entity Manager. And unfortunately I get the following error: org.apache.cayenne.CayenneRuntimeException: [v.3.0 Apr 26 2010 09:59:17] Commit Exception Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'myDatabase.auto_pk_support' doesn't exist Any...

How do I get a list of all Cayenne-managed entity classes?

I'm using Apache Cayenne as an ORM in my web application and I want to get a list of all entity classes that are managed by Cayenne (for example [Person.class,Account.class,...]). My goal is to register these classes in an Object<->PrimaryKey Converter for easy parameter handling. How would I do that? Thanks. EDIT: I'm using Cayenne ...