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

Relationship mapped fields are valued NULL

Here an example of my problem: I have an entity called "Person" (Name: String. CityId: Integer) I have a relation between "Person" and "City", named "toCity". I use to add the "CityId" field in the ObjEntity definition (using the Cayenen Editor)…
0
votes
1 answer

Cayenne Expression.fromString is not maintaining Parenthesis order

I have a string ((effectiveDate >= "11/01/2015") and (effectiveDate < "04/30/2016")) and (not ((name like "*John*")) and (name like "*Smith*") and (age > "20")) After I convert it to an expression it is not maintaining the parenthesis order …
0
votes
1 answer

HashMap to cayenne Expression

I have an original Cayenne Expression (effectiveDate >= 01/01/2015) and ((specialFeaturesString like "*808*") and ((amortizationType = "05") or (amortizationType = "06")) and (loanType = 2)) There is a util method in my codebase which converts…
0
votes
2 answers

Launching stored procedure which returns data via Apache Cayenne ORM does not work

I'm trying to launch a stored procedure in my MariaDB database. I'm using Apache Cayenne as ORM. The error message indicates that it can't find the stored procedure, but I have this working already for procedures that do not return data. Anyone…
Pefero
  • 11
  • 6
0
votes
1 answer

Convert plist format text to json format

Application uses Apache Cayenne. I receive a string in the following format. This string is available for me in HashMap format as well. {And=[(effectiveDate >= Tue Sep 01 00:00:00 EDT 2015), {And=[(loanType = 2),…
0
votes
1 answer

Which is better ORM (Apache Cayenne) , JDBC or SpringJDBC?

I am Working on multiple database like MSSQL server and PostgreSQL with heavy transactions and complex queries. I have searched that simple jdbc is more faster then ORM. I was thinking of using ORM because I do not want to write different query for…
0
votes
0 answers

Query at the time of inserting data using Apache Cayenne

I have written a code in java 8 to insert data in sql server 2012 using apache cayenne 3.1. While executing code I got an exception : org.apache.cayenne.CayenneRuntimeException: [v.3.1 Sep 20 2014 14:24:57] Commit Exception Caused by:…
0
votes
1 answer

Apache Cayenne: NullPointerException when commitChanges

I'm trying commitChanges, but catch java.lang.NullPointerException. log: ... INFO: --- transaction started. авг 04, 2015 12:33:59 PM org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy processSchemaUpdate INFO: Full or partial schema…
sergpc
  • 305
  • 1
  • 4
  • 11
0
votes
1 answer

Trigger callback method from another callback method

I have a PrePersist callback that creates Assignment objects. I need to trigger callbacks to let me know when these Assignment objects are inserted into the database. PostPersist callbacks for Assignments are not being triggered this way. The…
Tuan
  • 1,476
  • 13
  • 23
0
votes
1 answer

Apache Cayenne: supplying dynamically generated project definition

following on from this question: Apache Cayenne: user-defined tables: examples? As part of my design, I'm intending to allow operations which modify the database schema at run time. As discussed in the above question, it does seem that Cayenne…
oggotron
  • 27
  • 3
0
votes
1 answer

Apache Cayenne: user-defined tables: examples?

I'm looking at Apache Cayenne as my ORM layer for a new application. Part of my DB model will be defined in a fixed model which will be known at compile time. However, another part of the model will be defined at runtime by certain limited user…
oggotron
  • 27
  • 3
0
votes
1 answer

Filter custom fields not present in database using Apache Cayenne

In my API it is currently possible to filter on all fields that exists in the database. Filtering is implemented in FilterUtils.java in the API project. This translates the url parameters to a Apache Cayenne search and returns the result to the…
mrlarssen
  • 325
  • 8
  • 19
0
votes
1 answer

CayenneModeler not generating Cayenne.xml

I am learning Apache Cayenne, so I am new to it. I am following the official guide http://cayenne.apache.org/docs/3.0/tutorial.html. I am doing exactly the same as the guide says, but when I save the project, it's generating 2 xml files, instead of…
Soumitri Pattnaik
  • 3,246
  • 4
  • 24
  • 42
0
votes
1 answer

Cayenne 3.1 - Disable Cache

Here's my situation; let's assume I have 2 tables; employee and responsibility where Responsibility.employee_id = employee.id. Sometimes we need to update Responsibility.employee_id manually and there's no way to avoid this, it needs to be done…
Trying...
  • 127
  • 9
0
votes
1 answer

How to get JodaTime DateTime object from SQLTemplate using SQLResult

I'm trying to return a JodaTime DateTime object. It works for the effective_date field below. But I'm not sure how to get it to return DateTime for the Event object. Any ideas? String sql = "SELECT a.availability_id, a.event_id,…
Tuan
  • 1,476
  • 13
  • 23
1 2 3
8 9