Re: MySql connection timeout

2009-03-31 Thread Dave Merrin
on(DataNode.java:544) at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:251) ... 24 more Andrus Adamchik wrote: On Mar 31, 2009, at 3:52 PM, Dave Merrin wrote: I'm using the Cayenne PoolManager. I've just turned on the logging for this class and discovered my connection is timing out. Cayenne is t

Re: MySql connection timeout

2009-03-31 Thread Dave Merrin
.apache.org/CAY/reconnect.html 2009/3/31 Dave Merrin Hi, I've read about and understand that my application is having its connection timed out after 8 hours of inactivity using MySql. I've set the timeout to be 120 seconds so I can try and reproduce the error without waiting for 8 h

Re: MySql connection timeout

2009-03-31 Thread Dave Merrin
nect.html 2009/3/31 Dave Merrin Hi, I've read about and understand that my application is having its connection timed out after 8 hours of inactivity using MySql. I've set the timeout to be 120 seconds so I can try and reproduce the error without waiting for 8 hours. Unfortunately I

MySql connection timeout

2009-03-31 Thread Dave Merrin
Hi, I've read about and understand that my application is having its connection timed out after 8 hours of inactivity using MySql. I've set the timeout to be 120 seconds so I can try and reproduce the error without waiting for 8 hours. Unfortunately I'm never seeing the problem. I connect, ma

Re: ExpressionFactory Usage?

2009-01-08 Thread Dave Merrin
C even Expression.fromString() will not support comparing two columns, instead expecting path vs value comparison (worth a try though). EJBQLQuery on the other hand will support such comparison. Andrus On Jan 8, 2009, at 6:19 PM, Dave Merrin wrote: Hi, I'm trying to create an expres

ExpressionFactory Usage?

2009-01-08 Thread Dave Merrin
Hi, I'm trying to create an expression that compares to fields in a single table i.e. number1<=number2. I'm using the ExpressionFactory to create all my expressions. Can I still use it to do create this expression? Cheers, Dave

Re: Object Caching in 1.2

2008-12-15 Thread Dave Merrin
Just a quick update for those who offered help. I'm now working on a new project and the prefetching works perfectly. Not sure what was happening in the old project. Cheers, Dave Dave Merrin wrote: Of course now you've said that I've realised that I already knew it. As a res

Re: Object Caching in 1.2

2008-11-26 Thread Dave Merrin
Of course now you've said that I've realised that I already knew it. As a result we did move our software on to 2.0 quite a while back. I'm not currently working on that code but once I'm back on it I'll give prefetching a try. I'll report back with my findings. Cheers, Dave Michael Gentry

Re: Object Caching in 1.2

2008-11-25 Thread Dave Merrin
doc12/prefetching.html In short words, you need to specify selectQuery.addPrefetch("toEdition") for the query you fetch newsparers with. 2008/11/18, Dave Merrin <[EMAIL PROTECTED]>: Hi, I'm trying to speed up some code I've got. I've got two connected tables, Newspaper and

Object Caching in 1.2

2008-11-18 Thread Dave Merrin
Hi, I'm trying to speed up some code I've got. I've got two connected tables, Newspaper and Edition. Newspapers contain several editions. Initially I get back a list of newspapers with a single query. Then I want to get the editions for each newspaper. I use newspaper.getToEdition() to do thi

Re: SQLTemplate - multiple statements

2008-03-03 Thread Dave Merrin
multiple queries to appear as a single query (and run in the same transaction with default Cayenne transaction settings), you can use a QueryChain: http://cayenne.apache.org/doc/querychain.html Andrus On Mar 3, 2008, at 2:30 PM, Dave Merrin wrote: Hi, is it possible to have multiple sql

SQLTemplate - multiple statements

2008-03-03 Thread Dave Merrin
Hi, is it possible to have multiple sql statments in the one SQLTemplate? e.g. Cheers, Dave

DeleteQuery exception

2008-02-27 Thread Dave Merrin
Hi, I'm trying to delete records from a database table based on some info in another related table. Unfortunately I'm getting an exception when using the DeleteQuery. Has this been fixed or is there any other way to delete like this? java.lang.RuntimeException: db relationships not supported

Re: Reengineer Database Schema ant task

2007-11-15 Thread Dave Merrin
d the datamap, it may be worthwhile to add some sort of ant task for that. If it is something you'd like to see in 3.0, please file a JIRA and it'll get reviewed. On 11/15/07 9:05 AM, "Dave Merrin" <[EMAIL PROTECTED]> wrote: Hi, is there an ant task to reengine

Re: Reengineer Database Schema ant task

2007-11-15 Thread Dave Merrin
e the generated DataMap in the application right away, without a restart. I've done it on one project. IMO such dynamic ORM is pretty cool. Andrus On Nov 15, 2007, at 10:52 AM, Dave Merrin wrote: Hi Kevin, can I make direct use of a function in the Modeler jar to instantiate a generate f

Reengineer Database Schema ant task

2007-11-15 Thread Dave Merrin
Hi, is there an ant task to reengineer the database as you can with Cayenne Modeler? Cheers, Dave

Re: Select Query on Table with no Primary Key

2007-06-08 Thread Dave Merrin
Hi Andrus, I had seen this as being a problem but not one that I really cared about. The main functionality I was after was being able to generate classes and have them mapped through to database tables. I've got a fair bit of code using cayenne already which I wanted to use again. It would b

Re: Select Query on Table with no Primary Key

2007-06-07 Thread Dave Merrin
Signature IT-Consult Armainak Sarkis - Original Message - From: "Dave Merrin" <[EMAIL PROTECTED]> To: Sent: Thursday, June 07, 2007 3:36 PM Subject: Re: Select Query on Table with no Primary Key Hi Andrus, I was playing about with putting in my own EntityResolver. Fo

Re: Select Query on Table with no Primary Key

2007-06-07 Thread Dave Merrin
, Tore Halset wrote: On Jun 6, 2007, at 16:12 , Dave Merrin wrote: I'm trying to run a SelectQuery on a table with no primary key. Unfortunately it's not working. Can anybody help? I have no control over the database so I can't add in primary keys. As you know the PK are essentia

Re: Select Query on Table with no Primary Key

2007-06-07 Thread Dave Merrin
the views. We already use Cayenne on a different project so we have a lot of code to make things easier for us. This is the main reason I'm not looking at alternatives to solve the problem. Cheers, Dave Tore Halset wrote: On Jun 6, 2007, at 16:12 , Dave Merrin wrote: I'm trying to ru

Re: Select Query on Table with no Primary Key

2007-06-07 Thread Dave Merrin
ideas) is to model that ObjEntity (and perhaps others it relates to?) as read-only and see if Cayenne stops caring about missing a PK. Just a thought -- I've not tried it. /dev/mrg On 6/6/07, Dave Merrin <[EMAIL PROTECTED]> wrote: Sorry, I forgot to mention that I won't be

Re: Select Query on Table with no Primary Key

2007-06-07 Thread Dave Merrin
From a brief try this morning I don't think this works. I'm going to try again and also see if there is anything else I can do. Cheers, Dave Michael Gentry wrote: It's not a hijacking. It is interesting to point out that JPA does not support tables without PKs -- I really should learn more a

Re: Select Query on Table with no Primary Key

2007-06-06 Thread Dave Merrin
st a thought -- I've not tried it. /dev/mrg On 6/6/07, Dave Merrin <[EMAIL PROTECTED]> wrote: Sorry, I forgot to mention that I won't be updating the data. I would like to move round the database using relationships though. Apart from changing the database are there any hacks I c

Re: Select Query on Table with no Primary Key

2007-06-06 Thread Dave Merrin
41 AM, Dave Merrin wrote: Sorry, I forgot to mention that I won't be updating the data. I would like to move round the database using relationships though. Apart from changing the database are there any hacks I could try to get round this problem. Cheers, Dave Michael Gentry wrote: Cay

Re: Select Query on Table with no Primary Key

2007-06-06 Thread Dave Merrin
to do UPDATEs. If you aren't modifying the data, you might try fetching as data rows instead of CayenneDataObjects. I'm not certain if that would work, but has a much higher chance. Of course, you still won't be able to make a CayenneDataObject out of it. /dev/mrg On 6/6/07,

Select Query on Table with no Primary Key

2007-06-06 Thread Dave Merrin
Hi, I'm trying to run a SelectQuery on a table with no primary key. Unfortunately it's not working. Can anybody help? I have no control over the database so I can't add in primary keys. Cheers, Dave INFO QueryLogger: SELECT t0.ID, t0.KIND, t0.TIMESTAMP FROM MPS.STATETABLE_CPT t0 INFO Qu