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
0
votes
1 answer

Inheritance - DB relations

I'm using Cayenne 4.1 and want to use the single table inheritance, but I have the problem that when using the modeller the DB relation I've created in the modeller are always dropped :-/ In Detail: I have the table and entity photo (superclass),…
Meex
  • 45
  • 3
0
votes
1 answer

Can I configure Cayenne to use a provider to get a new instance of a model?

I'd like to provide constructor arguments via Guice to new Cayenne data objects, but it looks like cayenne just uses Class.newInstance() to instantiate new instances. Is there any way to have Cayenne use a provider to get a new instance instead? I'd…
0
votes
1 answer

what is the current best method of getting the changes to an object hierarchy in Apache Cayenne?

I am evaluating Cayenne for some new projects. I wonder if it is possible (for unit test assertions) to capture changes the tested code did to an ObjectContext (or some underlying data representation) preferably before the commitChanges method…
0
votes
1 answer

is it possible in Apache Cayenne to prepopulate an ObjectContext without a database?

I am evaluating Cayenne for some new projects. I wonder if it is possible (for unit tests) to use Cayenne without a database and instead somehow prepopulate an ObjectContext from data I obtain from a file to reach an identical state as if it was…
0
votes
1 answer

Is it possible to control cayenne logging at a Bean level - in order to stop logging passwords

While running Cayenne with a Java application in DEBUG Mode, the cayenne operations are visible - passwords can be seen in the logs, when a password is changed. Unable to find information about controlling logging at a bean or class level. The log…
mala
  • 1
0
votes
1 answer

Apache Cayenne "Class is not mapped with Cayenne"

I am using Apache Cayenne to store data and check it against files to see if the file has been changed. I currently have a method that inserts data into my database but I am receiving: Exception in thread "main" java.lang.IllegalArgumentException:…
0
votes
1 answer

Finding a list of related objects by ID

Let's say for example I have a bridge table called PersonAnimal. I want to search for all the people who have a given animal's ID. The query so far looks like: Animal animal = getById(Animal.class, animalId) ObjectSelect …
gurpreet-
  • 509
  • 8
  • 18
0
votes
1 answer

Apache Cayenne - Batch Relationship Setting

I'm wondering if there is a way with Apache Cayenne to use their .setTo method for setting relationships without it pulling the object one at a time each time the method is called. I'm working with several thousands of rows of data and it having to…
Tim Hunter
  • 242
  • 1
  • 7
0
votes
1 answer

How to convert Model to JSON

When I naively use Jackson to convert to JSON i receive this exception: Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.cayenne.access.DefaultDataRowStoreFactory and no properties…
Gero
  • 1
  • 1
0
votes
1 answer

Apache Cayenne: Merging fixed with dynamically supplied DataMaps into one ServerRuntime

My Application design contains fixed and dynamically DataMaps to connect to different (Oracle) DB instances/users. For simplicity i did split them into two different Cayenne Projects. Create ServerRuntimeBuilder with fixed DataMap, build and query…
0
votes
1 answer

Define collation on a per query basis

We're using Apache Cayenne to integrate an already existing MS SQL Server database with our application (I have no permission to change the database DDL, including the table/schema/database collation). The database is using a specific collation…
adnan_e
  • 1,764
  • 2
  • 16
  • 25
0
votes
1 answer

Cayenne Modeler 3.1.2 is using tiny fonts on Windows 3.1.2. Is there a way to fix that?

It looks like this... Installed cayenne3.1.2 by downloading the zip and extracting all. Is there another step?
fmkatz
  • 39
  • 1
  • 4
0
votes
1 answer

Configure Apache Cayenne to be used in an asynchronous manner with Vertx

I'm using Apache Cayenne with Vertx. Vertx relies on everything to be asynchronous and it actively looks for threads that block. So performing something like... List artists = ObjectSelect.query(Artist.class).select(context); ...will result…
gurpreet-
  • 509
  • 8
  • 18
0
votes
1 answer

How do I make Apache Cayenne respect database defaults?

I have a postgres database with some defaults such as: CREATE TABLE product ( id serial, name text, created_at DEFAULT now(), price numeric DEFAULT 9.99 ); How do I make Cayenne honour those defaults when I do a…
gurpreet-
  • 509
  • 8
  • 18
0
votes
1 answer

How Can I Add a Prefetch to a NamedQuery/MappedSelect?

I have a named query in my model that's set to fetch Data Objects.
user695022
  • 579
  • 5
  • 16
1 2 3
8 9