Re: Query prefetch missing rows

2011-07-19 Thread Andrus Adamchik
It really shouldn't make a difference. So if you fetch the data outside Cayenne using MySQL client, which row is missing if you fetch SELECT `t0`.*, `t2`.`employee_id` FROM `scheduler_position` `t0` JOIN `scheduler_employee_position` `t1` ON (`t0`.`position_id` = `t1`.`position_id`) JOIN `sc

Re: Where to find default cgen templates

2011-07-19 Thread Joseph Senecal
Again, never mind. I found them inside cayenne-tools-3.1M2.jar as a folder named templates. I don't know how I missed them the first time I looked. Sorry for bothering everyone. Joe On Jul 19, 2011, at 7:08 PM, Joseph Senecal wrote: > I'd like to make a custom cgen template, but I need the def

Where to find default cgen templates

2011-07-19 Thread Joseph Senecal
I'd like to make a custom cgen template, but I need the default template to use as a model. I tried looking for it in the cayenne jar files, but haven't had any luck. Could someone please direct me to the default cgen velocity templates? Joe

Re: Query prefetch missing rows

2011-07-19 Thread Tad
I solved the issue by setting JOINT_PREFETCH_SEMANTICS on the prefetch. Why should this make a difference? -- Thanks! Tad

Query prefetch missing rows

2011-07-19 Thread Tad
I'm having an issue where prefetching a flattened relationship seems to skip rows or fetch them from a stale cache. In my test case, I can verify via mysql that the join table has 5 rows, yet prefetching only returns 4. DB layout: customer has-many positions customer has-many employees employees

Re: Not able to get maven to generate java source from model

2011-07-19 Thread Joseph Senecal
Never mind, I think I found my problem. Coming from EOF I was used to a single entry for both database and ORM descriptions. In Cayenne these are two different things and I needed to create both. Joe On Jul 19, 2011, at 12:30 PM, Joseph Senecal wrote: > I can now get the plugin to run, but it

Not able to get maven to generate java source from model

2011-07-19 Thread Joseph Senecal
I can now get the plugin to run, but it doesn't seem to be doing anything. I found some mistakes in my configuration. I figure there must be something else simple that I'm missing, but I'm just not seeing it. I'm not getting any error messages, but I'm not getting generated java files either. He

Re: Maven 3.1M2 cgen missing jars

2011-07-19 Thread Joseph Senecal
Thanks! That worked perfectly. I'm new to maven, I don't mind manually installing jars, I'm used to it :-) Joe On Jul 18, 2011, at 11:45 PM, Andrus Adamchik wrote: > Actually this one is about cgen, which is definitely much more critical than > the Modeler plugin, so we'll have to deal with i

Re: Cayenne 3.0.2 distribution

2011-07-19 Thread Andrus Adamchik
There's a checksum you can use to verify the file integrity: http://www.apache.org/dist/cayenne/cayenne-3.0.2.tar.gz.md5 On Jul 19, 2011, at 7:00 PM, Michael Gentry wrote: > Hi Bruno, > > I believe I used this mirror: > > http://mirrors.ibiblio.org/apache//cayenne/cayenne-3.0.2.tar.gz > > I w

Re: Cayenne 3.0.2 distribution

2011-07-19 Thread Michael Gentry
Hi Bruno, I believe I used this mirror: http://mirrors.ibiblio.org/apache//cayenne/cayenne-3.0.2.tar.gz I wouldn't expect there to be a difference, but never know ... mrg On Tue, Jul 19, 2011 at 11:57 AM, Bruno René Santos wrote: > I have downloaded from here... > > *http://mirrors.fe.up.pt/

Re: Cayenne 3.0.2 distribution

2011-07-19 Thread Bruno René Santos
I have downloaded from here... *http://mirrors.fe.up.pt/pub/apache//cayenne/cayenne-3.0.2.tar.gz* * * *and there are no jars... maybe the mirrors are wrong? Dont really know * * * *Bruno * On Tue, Jul 19, 2011 at 4:29 PM, Michael Gentry wrote: > Hi Bruno, > > I just downloaded cayenne-3.0.2.tar.g

Re: Cayenne 3.0.2 distribution

2011-07-19 Thread Michael Gentry
Hi Bruno, I just downloaded cayenne-3.0.2.tar.gz and see this: -rw-r--r-- 0 andrus andrus 2051140 Jun 11 04:26 cayenne-3.0.2/lib/cayenne-server-3.0.2.jar -rw-r--r-- 0 andrus andrus 937366 Jun 11 04:26 cayenne-3.0.2/lib/cayenne-client-3.0.2.jar -rw-r--r-- 0 andrus andrus 94697 Jun 11 04:26 c

Re: Error resolving fault, no matching row exists in the database for ObjectId

2011-07-19 Thread Wernke zur Borg
Yes, that could be the reason. The field in table A can hold a PK of table B, C, or D, but I don't know, so I have to test each of them. I thought that I could do a.getB(), then a.getC() then a.getD() until I get a non-null result. Wernke On 2011-07-19 16:45, Andrus Adamchik wrote: Hi

Re: Error resolving fault, no matching row exists in the database for ObjectId

2011-07-19 Thread Andrus Adamchik
Hi, Very often this is caused by DB referential integrity violation in the DB. E.g. you have a non-NULL FK that has no corresponding PK. Actually we are working on https://issues.apache.org/jira/browse/CAY-1437 right now that would allow to have a custom fault resolution strategy, so the case a

Cayenne 3.0.2 distribution

2011-07-19 Thread Bruno René Santos
Hello all, I dont know if this is correct but the Linux binary distribution on the site only has the compiled classes and no jars... And the source code raises some kind of error when I try to decompress it on windows... Regards Bruno Santos -- Bruno René Santos | brunor...@holos.pt | Gestor de

Re: Error resolving fault, no matching row exists in the database for ObjectId

2011-07-19 Thread Wernke zur Borg
Sorry, I forgot to mention this is with Cayenne 3.1M2. W. On 2011-07-19 15:16, Wernke zur Borg wrote: > Hi, > > this is similar to https://issues.apache.org/jira/browse/CAY-1379. > > I have a to-one relationship from table A to B. When I call b = a.getB() > I am sometimes getting a non-null resu

Error resolving fault, no matching row exists in the database for ObjectId

2011-07-19 Thread Wernke zur Borg
Hi, this is similar to https://issues.apache.org/jira/browse/CAY-1379. I have a to-one relationship from table A to B. When I call b = a.getB() I am sometimes getting a non-null result even though a corresponding row does not exist. I am getting the subject error when I call b.getSomeAttribute