[ANN] Apache Cayenne 1.2.3 and 2.0.3 release

2007-05-16 Thread Andrus Adamchik
Cayenne team is glad to announce a major bugfix release of the two stable branches: 1.2.3 and 2.0.3. See the details here: http://cayenne.apache.org/2007/05/16/may-16-2007-cayenne-203- and-123-released.html Note that 1.2.3 Maven bundle will take a few days to appear on ibiblio. 2.0.3

Re: OutOfMemoryError: reading a large number of objects one by one

2007-05-16 Thread Derek Rendall
My patch seemed to scale well - it got to about (I think) 40 Meg or so then stabilized with only nominal growth from there. I did not test much higher than 100 K records as I did not need to. I guess the size will be related to how big each record is when represented as a data row * number of

How do I get a record for non integer pk?

2007-05-16 Thread Frank
Hello, The code below is not working, as it expects the PK to be integer. There is only one String field in the table defined as a pk. Thanks Frank private void getRecord(String name) { DataContext context = DataContext.getThreadDataContext(); System s = new System(); s =

Re: How do I get a record for non integer pk?

2007-05-16 Thread Bryan Lewis
We use that objectForPK() method routinely with a String key and haven't had any problems. What do you mean by not working? Is it throwing a CayenneRuntimeException? Frank wrote: Hello, The code below is not working, as it expects the PK to be integer. There is only one String field in the

Re: How do I get a record for non integer pk?

2007-05-16 Thread Andrus Adamchik
Exactly. There is an 'objectForPk(.., int)' and another one 'objectForPk(.., Object)': http://cayenne.apache.org/doc20/api/cayenne/org/apache/cayenne/ DataObjectUtils.html Andrus On May 16, 2007, at 8:01 PM, Bryan Lewis wrote: We use that objectForPK() method routinely with a String key

Re: How do I get a record for non integer pk?

2007-05-16 Thread Frank
Does it have someting to do with the System name? reserved word? Class org.objectstyle.cayenne.CayenneRuntimeException Message [v.1.2.3 May 6 2007] PK is not a number: ObjectId:System, System=AIX org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 2007] PK is not a number:

Re: How do I get a record for non integer pk?

2007-05-16 Thread Andrus Adamchik
These two lines are not the same: at org.objectstyle.cayenne.DataObjectUtils.intPKForObject (DataObjectUtils.java:93) s = (System) DataObjectUtils.objectForPK(context, System.class, name); So now you are talking about a different problem. To fix your latest problem use pkForObject

Re: How do I get a record for non integer pk?

2007-05-16 Thread Frank
I think it has something to do with Click CayenneForm I changed CayenneForm to Form and it works. Seems CayenneForm is tring to fetch my int id Frank - Original Message - From: Andrus Adamchik [EMAIL PROTECTED] To: user@cayenne.apache.org Sent: Wednesday, May 16, 2007 1:17 PM Subject:

Re: How do I get a record for non integer pk?

2007-05-16 Thread Andrus Adamchik
I think you are right. Click CayenneForm IIRC does not support non- int PK's. Your stack confirms that: at org.objectstyle.cayenne.DataObjectUtils.intPKForObject (DataObjectUtils.java:93) at net.sf.click.extras.cayenne.CayenneForm.setDataObject (CayenneForm.java:335) Andrus On May 16,