Re: Re: SQLTemplate and setPageSize()

2008-08-07 Thread Jens Mayer
ataContexts, so you may have a race condition when you attempt to modify the query in the code. So you may want to clone the query like that: SQLTemplate localQuery = rawQuery.queryWithParameters(...); localQuery.setpageSize(50); Andrus On Aug 6, 2008, at 6:35 AM, Jens Mayer wrote: >

SQLTemplate and setPageSize()

2008-08-06 Thread Jens Mayer
Hi, i'm using Cayenne 2.0.4 with Oracle 10 and JDK 1.5. Please have a short look at this code: ... dataCtx, myID are set... SQLTemplate rawQuery = (SQLTemplate)dataCtx.getEntityResolver().lookupQuery("myQuery"); Map params = new HashMap(); params.put("processID", myID); rawQuery.setParameters

error finding node.xml in jar-file

2007-09-17 Thread Jens Mayer
Hi, I'm using the technique of copying datamaps (by Michael Gentry, look at http://cwiki.apache.org/CAY/copying-datamaps.html). Works fine as long as the configuration files are located in the filesystem. I moved them into a package (following the hints at http://cwiki.apache.org/CAYDOC/custom

Problem with self-join-relationship

2007-08-20 Thread Jens Mayer
Hi, I'm trying to build a tree-like structure based on data in my db. My table TMP_TRANSEDIT has a relationship to itself: TMPTRANSEDIT_ID NUMBER(10) is the PK ... and TMPTRANSEDIT_TMPTRANSEDIT_ID NUMBER(10) is used for the relationship to the parent. The tabledata is inserted by two querie

lookup-failure

2007-08-20 Thread Jens Mayer
Hi, I'm wondering about an error message: "Can't perform lookup. There is more than one ObjEntity mapped to class TmpAttredit" This is the code (as simple as possible): DataContext dataCtx = SelectQuery query = new SelectQuery(TmpAttredit.class); List result = dataCtx.performQuery(query)

Problem with SQLTemplate and Date-binding

2007-08-06 Thread Jens Mayer
Hi, I am having a problem with date-parameter-binding in a SQLTemplate. This is my coding: public static void validate(DataContext dataCtx) throws ParseException { final Map para = new HashMap(); final SimpleDateFormat sdf = new SimpleDateFormat("dd.MM. HH:mm:ss"); pa

user-defined transactions

2007-04-26 Thread Jens Mayer
Hi, I am not sure if I understood the concept of user-defined transaction: I am accessing two different db-schemas at the same time, using two DataDomains, one for each schema. Now I want to update data (synchronously) on both schemas with my own user-defined transaction-scope. I have to use

Testing the connection

2007-04-10 Thread Jens Mayer
In my application, the user has the ability to switch between databases (for testing purposes). He gets a little dialog, types in user/password/db-name and under the hood, an appropriate DataContext is built. Works fine, but I want to test the correctness of what he typed in BEFORE the next qu

Newbie Question concerning pk autoincrementing

2007-04-06 Thread Jens Mayer
Hi, I'm using cayenne with oracle 9.2.0.3.0 The pk-attributes in my schema are automatically generated by before-insert-triggers, so cayenne doesn't have to bother generating any pk. Due to this, I set the PK Generation Strategy for all DbEntities to "Database-Generated". And here comes the