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

Finding a list of objects by Primary Key ID - Apache Cayenne

This is kind of related to my previous question where I discussed finding rows by foreign key IDs. This question is directed at finding a list of objects by primary key ID. In the below code I am trying to find a list of Person objects by providing…
gurpreet-
  • 509
  • 8
  • 18
1
vote
1 answer

How to create a relationship to an ObjEntity in another DataMap?

Somewhere i read, that it's possible with Cayenne to have relationships connecting entities from two different DataMaps, just like WebObjects EOModeler. I am not able to create such relationship in Cayenne Modeler 4.0RC1 and 4.1M2 - the target…
1
vote
1 answer

Generate classes from Postgress database with multiple schemas using Cayenne

I have PostgreSQL database with multiple schema and I'm using Apache Cayenne to generate Java classes. Problem is that cayenne skips foreign keys on tables in different schema. Example: Table schema_b.booking that references schema_a.my_user: create…
xson
  • 55
  • 5
1
vote
2 answers

How to solve “Error generating PK : entity not supported” when using Cayenne

When committing changes to an Apache Cayenne context, I get an exception like the following. org.apache.cayenne.CayenneRuntimeException: [v.3.0.1 Sep 06 2010 15:09:38] Error generating PK : entity not supported: SOME_TABLE Why does this happen?
henko
  • 763
  • 7
  • 16
1
vote
1 answer

How to solve "Temporary ID hasn't been replaced on commit" with Cayenne

When committing changes to a Apache Cayenne context, I get an exception like the following. org.apache.cayenne.CayenneRuntimeException: [v.3.0.1 Sep 06 2010 15:09:38] Temporary ID hasn't been replaced on commit Why does this exception occur?
henko
  • 763
  • 7
  • 16
1
vote
1 answer

Error 'Packet for query is too large' when I tried to make a query on my website

Again I need your help. I'm trying to put my java web site online. What I use : MySQL server : command line mysql -V, result : mysql Ver 15.1 Distrib 10.1.23-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 Cayenne Debian server Java…
Bob
  • 529
  • 1
  • 7
  • 28
1
vote
1 answer

What is velocity.log file for Apache Cayenne?

I noticed that Apache Velocity is always writing logs to a file "velocity.log". Do we actually need this? How do I turn this off (disable velocity.log output)? Thanks!
ikevin8me
  • 4,253
  • 5
  • 44
  • 84
1
vote
1 answer

How to delete object in Apache-Cayenne?

My back-end application gets json object via REST API, which exists in database but not exist in Caeynne ObjectContext, how to remove object by id via ObjectContext. // // org.apache.cayenne // …
Yuriy Bochkarev
  • 79
  • 1
  • 10
1
vote
1 answer

Building Cayenne Expressions for EXISTS subqueries

I have the following optional, to-many relationship: PackingSlip <->> LineItem I need to match all the PackingSlip instances that do not have any related LineItem instances with an qtyOrdered > qtyShipped. What makes the most sense to me would be to…
David Avendasora
  • 4,538
  • 1
  • 16
  • 15
1
vote
1 answer

Apache Cayenne / PostgreSQL: "too many clients already" error

I'm using Apache Cayenne 4 Milestone 5 and I'm getting this error. The application is not officially deployed but it is being tested within the IntelliJ IDEA. Apr 03, 2017 10:19:58 PM org.postgresql.Driver connect SEVERE: Connection error:…
ikevin8me
  • 4,253
  • 5
  • 44
  • 84
1
vote
1 answer

Filter CayenneDataObject getXXXArray() entries with parameters?

My DB model is as following: A.id (1 : n) B.ad_id So in cayenne for object A a I can do a.getBArray() which returns me all the entries from B from this given A entry. Yet I would like to filter on this list, based on the property active =…
Maxim Veksler
  • 29,272
  • 38
  • 131
  • 151
1
vote
1 answer

How to manage PK generation with Cayenne 4.0 + PostgreSQL 9.4

I have: PostgreSQL 9.4 Apache cayenne 4.0.M3 A schema which consists of one simplest table "proba": CREATE TABLE proba ( id bigint NOT NULL, value character varying(255), CONSTRAINT proba_pkey PRIMARY KEY (id) ) A simple Main method: public…
skapral
  • 1,128
  • 9
  • 26
1
vote
0 answers

Apache Cayenne ROP: Is there a way to detect that my client connection has timed out?

I have a rich client application that uses the Apache Cayenne Remote Object Persistence framework to access and store data. Thus far I have been unable to find a graceful way of detecting and handling a connection timeout. A MissingSessionException…
bspkrs
  • 377
  • 1
  • 13
1
vote
2 answers

Using existing SQLite database in Cayenne

I've been playing around with Apache Cayenne in an IntelliJ project. I configure the JDBC in the datanode like in the image but it gives me an error I have the Cayenne project stored in my IntelliJ project folder, as well as the SQLite database…
Luca Mozzo
  • 892
  • 2
  • 8
  • 20
1
vote
1 answer

How can I define multi-column unique constraints with Apache Cayenne?

As is often the case in normalized database model design I want to define a multi-column unique constraint in addition to the auto-generated primary key constraint for a table that Apache Cayenne allows me to define via the modeling UI. Is it…
bspkrs
  • 377
  • 1
  • 13
1
2
3
8 9