Questions tagged [apache-cayenne]

Apache Cayenne is an open source persistence framework, providing object-relational mapping (ORM) and remoting services.

Cayenne seamlessly binds one or more database schemas directly to Java objects, managing

  • atomic commit and rollbacks
  • SQL generation
  • joins
  • sequences

and more. With Cayenne's Remote Object Persistence, those Java objects can even be persisted out to clients via Web Services.

Full details and documentation can be found at http://cayenne.apache.org

132 questions
1
vote
1 answer

Cayenne Cache - Does Query Cache Replace object Cache?

I am looking for resources on how to best configure cayenne when running in a cluster, or multiple JVMs using the same domain. I've been reading the documentation and I see this: "there are ways to notify other stacks about the object changes. This…
eric
  • 2,699
  • 4
  • 29
  • 40
1
vote
1 answer

How do you update a record with apache cayenne without using select clause

I am using apache cayenne 3.1. I know of one way to update records in the database is to first use select query to find record and then update it, but I don't want to use a select query for updating. How can I directly update the record?
1
vote
1 answer

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…
Jared
  • 39,513
  • 29
  • 110
  • 145
1
vote
2 answers

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…
Markus
  • 1,772
  • 1
  • 12
  • 20
1
vote
1 answer

How to use Apache Cayenne context in session with concurrent ajax requests?

I have an ObjectContext stored in the session. Now I have multiple ajax requests for the same session, all modifying the data of ObjectContext. How do I go about ensuring these requests will be thread safe? The following documentation suggests…
Tuan
  • 1,476
  • 13
  • 23
1
vote
0 answers

Saving array in h2db through Cayenne error

I'm trying to save persistent object through Cayenne interface: ServerRuntime runtime = new ServerRuntime("cayenne.xml"); ... DataContext context = (DataContext)runtime.getContext(); ObjectWithArray owa =…
DrDecay
  • 59
  • 1
  • 10
1
vote
1 answer

How to XML Bind an Apache Cayenne generated class

First off, apologies for the long question. I have a number of classes generated by Cayenne such as follows. public abstract class _Form extends CayenneDataObject { public static final String NAME_PROPERTY = "name"; public static final…
Tom Hadkiss
  • 267
  • 1
  • 7
  • 16
1
vote
1 answer

porting Apache Cayenne from oracle to postgreSQL

I'm porting an existing Java project from Oracle 10 to PostgreSQL 9.1.8 (is this version actually supported from Cayenne?) Something is wrong in OUT parameters when a cursor is returned. Return type should be of types.OTHER but it looks like as a…
1
vote
1 answer

Cayenne "resets" primary key value?

I am using Cayenne to add records to a MySQL database, and I am seeing some strange behavior. When I run my application, I create a DataContext, perform a series of adds, then close the application. This works out well, because I am using an integer…
Factor Three
  • 2,094
  • 5
  • 35
  • 51
1
vote
1 answer

Updating an object to the database using Apache Cayenne

I am using Cayenne in a project for the first time. Till now, i was using the SelectQuery and was loving it. I now need to update an object e.g. my User object contains an emailId attribute. When the user needs to update his/her email, i take the…
user1781912
  • 43
  • 1
  • 1
  • 5
1
vote
1 answer

Using cayenne in Axis2 service : cannot find cayenne.xml

I'm trying to use cayenne within an Axis2 service (compiled as an .aar file). I was able to make the service locate my cayenne jar but when I try to make a query on the database, it throws the following exception: 2013-01-15 17:52:38,891…
ixM
  • 1,244
  • 14
  • 29
1
vote
1 answer

Obtaining DataSource from Cayenne DataConext

Currently I am using Cayenne as my ORM. I need to get DataSource for initializing Velocity Engine in my code. I can manually create the datasource but I don't want to do it and want to use the existing datasource from Cayenne.
Narendra
  • 5,635
  • 10
  • 42
  • 54
1
vote
2 answers

How to retrieve only the PKs of a table

I'm working with Java Apache Cayenne, under a MySQL DB. I have quite a large table with a single bigint PK and some fields. I'd like to retrieve just only the PK values and not all the object that maps this entity, as it would be too…
Cristiano Ghersi
  • 1,944
  • 1
  • 20
  • 46
1
vote
1 answer

Apache Cayenne ROP Server "No session associated with request." on Tomcat 7

I develop a cayenne project with a java rich client and an remote obejct persistence server. If i the rich cient connects with a Cayenne-ROP-Server that is deployed on the same machine on localhost (on Jetty from maven goal like explained inside the…
cpasemann
  • 103
  • 6
1
vote
1 answer

How do I add a driver to the list of those recognized by CayenneModeler?

I'm new to Apache Cayenne, and I'm trying out my first project. I'm attempting to use the Tools > Reengineer Database Schema feature of CayenneModeler to reverse engineer a SQL Server database. I attempted to create a new "Saved DataSource". I…
Troy
  • 21,172
  • 20
  • 74
  • 103
1 2
3
8 9