cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngong <>
Subject Re: new to cayenne
Date Sat, 14 Jan 2012 09:44:07 GMT
Fair enough, Ari. 

(however, I tried to be as nice as possible, reduced the project to just a
few lines. Nothing extra in there, just the code producing the error.)

Yes, I went through the tutorial, step by step and I take it as a reference
while developing. It worked out fine. Thank you for that valueable
(My goal is to take an existing schema ( )
of a time tracking application and add records to it that I collected with
my smart phone.)

To run my test that leads to the error I have Eclipse with m2e and mysql

Create a database:
mysql -u<user> -p<password>

Import the tables:
mysql -u<user> -p<password> eHour <eh.dump

Run As: Maven generate-sources
Run As: Maven test

The pom.xml: &lt;a

The Cayenne xml: 
The map.xml: 
The Java code: 

The code is very simple: It reads in all timesheet entries as of a certain
date (in order to make sure not to enter something twice, but that is
exchanged just by a printout here). 

The PK of a timesheet entry is made of two columns: a date and a FK of a
project assignment (actually a relation between a project and a user).

To make sure that a foreign record exists in the example here I just took a
project assignment from the first timesheet entry I had read in.

Commiting that newly created timesheet record leads to the error: 

With this consol output: 

I am pretty sure that the source of my error is somthing simple I have
ovelooked. However, as I have no clue where to look and what to do next (I
googled and searched on Cayenne pages a lot) I provide you all information
that may be need. Sorry for the amount.

Kind Regards


View this message in context:
Sent from the Cayenne - User mailing list archive at

View raw message