Re: security

2007-01-31 Thread Andrus Adamchik
Hi Carl, To be honest a few ROP projects that I've done used all-or-nothing security (if you are authenticated, you can do anything). Still I've been also thinking about more fine-grained approach. My solution would be to set up a custom 'org.apache.cayenne.DataChannel' decorator, adding

Re: New user PK id question

2007-02-01 Thread Andrus Adamchik
Yes, until 3.0 the logic in Cayenne worked like this: 1. if you don't map PK as an object property, Cayenne will generate the PK. 2. if you do map it, you must provide it yourself. (3.0 relaxed this restriction, but 3.0 is not officially released yet) Do not add the id to the properties

Re: security

2007-02-02 Thread Andrus Adamchik
On Jan 31, 2007, at 7:50 PM, Carl Mosca wrote: Is there a published timetable for 3.0? We are preparing the first milestone (alpha) of 3.0. It should go out pretty soon. Otherwise - no, there's no timetable (standard open source disclaimer about volunteer labour goes here), but there is

Re: can't find procedure without a parameter on Postgres

2007-02-08 Thread Andrus Adamchik
Bryan, this is a bug, I can confirm that: https://issues.apache.org/cayenne/browse/CAY-750 I fixed it on trunk (Cayenne 3.0). Will apply it to 2.0 and 1.2 branches shortly. Andrus On Feb 6, 2007, at 1:35 PM, Bryan Lewis wrote: I had this code working on an Oracle8 database:

Re: Version 2 doc linking

2007-02-11 Thread Andrus Adamchik
Hi Ari, On Feb 9, 2007, at 8:29 PM, Aristedes Maniatis wrote: Just a heads up that I've finished linking together all the children in the version 2 docs. It is a little time consuming, so I don't think I'll do version 1.2, since the pages are identical to version 2.0 almost everywhere.

Re: cayenne with jetty6

2007-02-13 Thread Andrus Adamchik
Hi Peter, [I stripped message that you quote, since it has no relation to the topic you started.] perhaps someone could add the docs http://cayenne.apache.org/doc/ tutorial-webapp.html with some usefull information about jetty6. I don't think this is Jetty6-related at all. even with

Re: cayenne with jetty6

2007-02-13 Thread Andrus Adamchik
On Feb 13, 2007, at 10:48 AM, Andrus Adamchik wrote: perhaps someone could add the docs http://cayenne.apache.org/doc/ tutorial-webapp.html with some usefull information about jetty6. I don't think this is Jetty6-related at all. Although providing a sample Jetty JNDI DataSource

Re: How do you deal with AS400 schemas

2007-02-13 Thread Andrus Adamchik
of Cayenne. Thanks Andrus On Feb 13, 2007, at 11:51 AM, Frank wrote: Hi Andrus, I have submitted this as a open a bug report. Frank - Original Message - From: Andrus Adamchik [EMAIL PROTECTED] To: user@cayenne.apache.org Sent: Tuesday, February 13, 2007 11:40 AM Subject: Re: How do you

Re: Cayenne and Daylight Savings Time Change?

2007-02-16 Thread Andrus Adamchik
I second that - Cayenne relies on the JDK, JDBC driver and the database to do the right thing. Those three can of course give you lots of headache... http://www.objectstyle.org/cayenne/lists/cayenne-user/2006/12/0107.html Andrus On Feb 15, 2007, at 11:14 PM, Michael Gentry wrote: I'm

Re: AW: Getting primary key of object after save

2007-02-26 Thread Andrus Adamchik
That's an old piece of docs. It still works though, but it is much easier to use DataObjectUtils: http://cayenne.apache.org/doc12/dataobjectutils.html Andrus On Feb 26, 2007, at 10:33 AM, Peter Schröder wrote: hi sam, i think that you can get the pk through the snapshot of the object

Re: security - revisited

2007-02-27 Thread Andrus Adamchik
Well, think of it this way - Cayenne ROP provides the data model and a way to add hooks to the runtime. These are the two pieces that can be used to implement a custom security mechanism. None of the security features are built in Cayenne, but it allows adding them. So answering Carl's

Re: PK Generation Strategy: Database-Generated doesn't work

2007-03-01 Thread Andrus Adamchik
Hi Manuel, Per http://cayenne.apache.org/doc/generated-columns.html DB-generated pk depends on support of this feature by the underlying JDBC driver. Our testing showed that it only works in MySQL, Derby and SQLServer. For HSQLDB this feature is turned off (I just tried it on HSQL

Re: expression to find out null relationship

2007-03-05 Thread Andrus Adamchik
On Mar 3, 2007, at 7:47 AM, Marcin Skladaniec wrote: - [v.3.0-SNAPSHOT Jan 19 2007 05:26:38] [v.3.0-SNAPSHOT Jan 19 2007 05:26:38] Exception processing message org.apache.cayenne.remote.QueryMessage. Root cause: [v.3.0-SNAPSHOT Jan 19 2007 05:26:38] Null value for 'id'. Marcin, can you

Re: Importing an EOModel with single table inheritance

2007-03-05 Thread Andrus Adamchik
Hi Simon, Looking at the code, it fails not because of single-table inheritance, but still I think this is a bug in Cayenne. Could you please open a bug report and attach your EOModel to it - I'd like to investigate more. http://issues.apache.org/cayenne/ Thanks Andrus On Mar 4, 2007,

Re: Calling commitChanges() from inside postPersist()

2007-03-06 Thread Andrus Adamchik
Sam, this could be a bug in the lifecycle (I haven't looked, I am in a time crunch now). Could you open a bug report documenting your findings. Thanks Andrus On Mar 6, 2007, at 2:59 AM, Sam Shah wrote: Hi, in a postPersist() callback method I'm trying to get a local copy of the

Re: Cayenne Classic vs. Cayenne JPA

2007-03-07 Thread Andrus Adamchik
(This thread has been duplicated on the dev list, see Ari's reply [1]. Also Randy doesn't seem to be a user list subscriber, so I am cc'ying to him) - Are there Cayenne functionalities available to Classic, but not JPA version? Both will be using the same stack. The principal difference

Re: Cayenne Classic vs. Cayenne JPA

2007-03-07 Thread Andrus Adamchik
On Mar 7, 2007, at 3:04 PM, Randy Leonard wrote: But note JPA tools likely store all model data in annotations Not necessarily. JPA supports any combination of XML and annotations. It is up to the user how to do the mapping. Andrus

Re: Cayenne Classic vs. Cayenne JPA

2007-03-07 Thread Andrus Adamchik
On Mar 7, 2007, at 3:04 PM, Randy Leonard wrote: I would hope the industry provides vanilla JPA modelling tools, with the possibilty of provider-specific tool-extensions I would hope so. to add provider-specific annotations. JPA deals with some of that already: * Query extensions can

Re: Improvement ? code generation (templates)

2007-03-07 Thread Andrus Adamchik
Hi Jerome, Could you give specific examples of the code you want to see generated? From your message I don't quite understand why we need to change the *default* template? Cheers, Andrus On Mar 7, 2007, at 5:50 PM, jerome moliere wrote: Hi all, rather than using custom templates could

Re: Importing an EOModel with single table inheritance

2007-03-09 Thread Andrus Adamchik
Fixed - check out the snapshot build of 2.0 that I posted here: http://people.apache.org/~aadamchik/nightly/03092007/ Andrus On Mar 5, 2007, at 2:10 PM, Simon McLean wrote: Hi Andrus - It's on there: CAY-764 Simon On 5 Mar 2007, at 11:15, Andrus Adamchik wrote: Hi Simon, Looking

Re: lifecycle callbacks and ROP

2007-03-10 Thread Andrus Adamchik
On Mar 10, 2007, at 2:15 AM, Aristedes Maniatis wrote: On 10/03/2007, at 10:13 AM, Tore Halset wrote: Hello. I am a lifecycle callbacks newbie trying to understand http:// cwiki.apache.org/CAYDOC/lifecycle-callbacks.html in a ROP context. Can the callback methods be defined in the

Re: Cayenne v3.x and OSX

2007-03-12 Thread Andrus Adamchik
On Mar 12, 2007, at 2:29 AM, Randy Leonard wrote: I've downloaded the Cayenne 3.0 snapshot as referenced from the cayenne web site, and also built the latest code found in svn (including the 'mvn -P mac install' command), but still don't see a CayenneModeler application instance for OSX.

Re: Wanted: performance tuning hints

2007-03-12 Thread Andrus Adamchik
What I found was that in Insert operations, it is best to use Cayenne data objects (as opposed to raw SQL queries) Cayenne adapters for Oracle, Derby, FrontBase, Postgres and SQLServer use JDBC-level batching that sometimes speeds things up significantly. SQLTemplate doesn't use JDBC

Re: Cayenne v3.x and OSX

2007-03-13 Thread Andrus Adamchik
On Mar 13, 2007, at 1:35 AM, Randy Leonard wrote: svn co https://svn.apache.org/repos/asf/cayenne/main/trunk/ cayenne cd cayenne mvn install mvn -P mac install cd cayenne/assembly ./build-mac.sh Skip the last step (not sure why it didn't work... every day Maven brings new

Re: lifecycle callbacks not always fired

2007-03-14 Thread Andrus Adamchik
Is it an update that resulted from another callback by any chance? Andrus On Mar 14, 2007, at 8:51 AM, Lachlan Deck wrote: Hi Andrus (in particular), (Note: 3 tier Cayenne) we're finding that the postUpdate method is not being called if an operation is commenced on the server-side (like a

Re: Does SelectQuery.addCustomDbAttribute[s] work?

2007-03-14 Thread Andrus Adamchik
On Mar 14, 2007, at 8:46 AM, Lachlan Deck wrote: Hi Andrus, On 14/03/2007, at 4:53 AM, Andrus Adamchik wrote: IIRC no work has been done since the issue was opened. So it only works for the DbAttributes of the root table. From the first glance it shouldn't be too hard to add what Tore

Re: lifecycle callbacks not always fired

2007-03-14 Thread Andrus Adamchik
value is saved to db, but postUpdate never runs. Regards Marcin On 14/03/2007, at 8:59 PM, Andrus Adamchik wrote: Is it an update that resulted from another callback by any chance? Andrus On Mar 14, 2007, at 8:51 AM, Lachlan Deck wrote: Hi Andrus (in particular), (Note: 3 tier Cayenne) we're

Re: Cayenne -- Apache re-deploy problem -- NullPointerException

2007-03-14 Thread Andrus Adamchik
Hi Marc, I'm using Cayenne (2.0.2) with the apache web server (5.5.20) and I'm facing to the following problem. You mean Tomcat, not apache web server (which would be httpd)? When apache does an automatic deploy, all objects are serialized / deserialized without any error. But after that,

Re: [OT] Maven in Cayenne

2007-03-15 Thread Andrus Adamchik
On Mar 15, 2007, at 12:59 PM, jerome moliere wrote: In fact I just want to warn a big problem (like the cocoon members wrote in their build notes) it seems that Maven has some strange behaviours, very dispappointing when using continuus integration you may see several alerts (by mail)

Re: svn checkout error

2007-03-15 Thread Andrus Adamchik
IIRC there were some problems with long paths and Subversion on Windows. I had to check out the code straight to C:\cayenne to shorten the path. Try it - if it works, we'll put a note in the developer guide. Andrus On Mar 14, 2007, at 10:36 PM, Borut Bolčina wrote: Hi all, checking

Re: AW: AW: AW: possible bug / memory leak in DispatchQueue and EventManager?

2007-03-15 Thread Andrus Adamchik
to restart the WebService every night which prevents this bug from causing any harm but I really would like to fix it properly and remove the cronjob. Thanx Ayhan Kondoz -Ursprüngliche Nachricht- Von: Andrus Adamchik [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 21. Februar 2007 15:20

Re: lifecycle callbacks not always fired

2007-03-16 Thread Andrus Adamchik
any remaining derived DataContext methods that can be executed on a generic ObjectContext. Andrus On Mar 16, 2007, at 2:27 AM, Lachlan Deck wrote: Hello again, On 15/03/2007, at 12:15 AM, Andrus Adamchik wrote: One last try at guessing it. On the server you have to do some magic

Re: Running a query over multiple Databases?

2007-03-16 Thread Andrus Adamchik
Doing a join across DB's generally doesn't work (although it may *appear* to work in simpler cases of matching of FK), as it will require Cayenne to do in memory cartesian product processing. So you'll have to do it manually. (actually sounds like an interesting improvement ... although

Re: Non persistent attributes

2007-03-19 Thread Andrus Adamchik
BTW, JPA spec defines a concept of a transient attribute, so this will be coming to Cayenne as well. Although as others noticed this is primarily a non-functional (although useful) convenience. Andrus On Mar 18, 2007, at 2:33 PM, Juergen Saar wrote: The actual way for cayenne is the

Re: Cayenne Question

2007-03-23 Thread Andrus Adamchik
Hi Prashant, Note that Cayenne user support is done via the mailing list, as it allows us to better share the community knowledge. I am ccy'ing the question to the list. Please feel free to continue this discussion on the list: http://cayenne.apache.org/mailing-lists.html On Mar 23,

Summer of Code 2007

2007-03-26 Thread Andrus Adamchik
I overlooked the start of the Google Summer of Code program this year, but it is not too late yet for the students and mentors to sign up. See the details here: http://wiki.apache.org/general/SummerOfCode2007 Interested Students: Summer of Code is a program sponsored by Google that allows

Re: 1.2.2 fetchFinished broken?

2007-03-30 Thread Andrus Adamchik
No, it is not a known bug. While 'fetchFinished' is deprecated in 3.0 in favor of lifecycle callbacks, it should work in 1.2.x. Could you open a bug report with some sample code that demonstrates the problem? http://issues.apache.org/cayenne/ Thanks Andrus On Mar 30, 2007, at 12:44 AM,

Re: Too many EventManager's?

2007-03-30 Thread Andrus Adamchik
Interesting. Didn't know it was a known problem with java 1.4. Lazy initialization was used exactly because we don't want dispatch threads to start unless they are needed. So ... per Wikipedia article this is a legacy JDK problem and going forward we should simply be using volatile

Re: Cayenne -- Apache automatic deploy problem

2007-03-30 Thread Andrus Adamchik
Hi, See my original reply asking for more information here: http://objectstyle.org/cayenne/lists/cayenne-user/2007/03/0101.html BTW, it would be much easier to communicate if you subscribe to the list :-) Andrus On Mar 30, 2007, at 4:46 PM, Marc Gabriel-Willem wrote: Hi, Sorry to

Re: Cayenne -- Apache automatic deploy problem

2007-04-01 Thread Andrus Adamchik
/ cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/access/ DataContext.java On Mar 30, 2007, at 10:55 AM, Marc Gabriel-Willem wrote: Hello, I checked the entity resolver value. Indeed, in this situation the value is 'null'. Marc -Original Message- From: Andrus Adamchik [mailto

Re: BUG: Sql server Database pk generation ?

2007-04-01 Thread Andrus Adamchik
Hi, I don't think there was a change between 1.2.x and 2.0.x in this code. The error either means that the database schema in question is not setup to support autoincrement, or the driver doesn't support autoincremented keys. Are you using the same database and the same JDBC driver as

Re: SMall bug in docs

2007-04-02 Thread Andrus Adamchik
Hi Jerome, Could you please post the links to such pages? I don't see any references to objectstyle packages on cgen page, except for the 1.2 documentation bundle of course. Andrus On Apr 2, 2007, at 10:07 AM, jerome moliere wrote: Hi all, just to say that some web pages still refer to

Re: Calling MySql Stored Procedure return no resultset

2007-04-02 Thread Andrus Adamchik
Michael, Cayenne didn't officially support MySQL stored procedures as of 1.2 and 2.0. But in fact it is fairly easy to turn it on, based on the code used in other adapters. Let me poke around in the next few days - I may be able to enable it in 3.0 pretty quickly. Andrus On Apr 2,

Re: commitChanges() doesn't imply commit in db ?

2007-04-04 Thread Andrus Adamchik
Hi Jerome, I hope you don't mind that I am taking my reply back to the list to explain the line between free and commercial support for Cayenne. First - my proposal to help you as a consultant is not a business model! This is just reflecting a fact that there is only so much time a small

Re: commitChanges() doesn't imply commit in db ?

2007-04-04 Thread Andrus Adamchik
On Apr 4, 2007, at 2:05 PM, Andrus Adamchik wrote: BTW, can you reproduce it without, just by running multiple parallel instances? that's reproduce without JMS :-)

Re: Cayenne web application tutorial

2007-04-07 Thread Andrus Adamchik
I am not aware of it, but this tutorial shows how to map and wire the main pieces. The next level is the User Guide itself. Andrus On Apr 8, 2007, at 10:25 AM, Reid Thompson wrote: Is there a more advance web application tutorial available than the one at

Testing on Sybase

2007-04-08 Thread Andrus Adamchik
is of any relevance to what Jerome is doing, but can you possibly look in the Sybase logs to see what's going on on the Sybase server? Andrus On Apr 4, 2007, at 2:05 PM, Andrus Adamchik wrote: Cool - there may have been some misunderstanding on my part as well :-) I misinterpreted your

Re: refreshing of cached objects

2007-04-19 Thread Andrus Adamchik
I suggest to use DataContext.invalidateObjects() to restore the object state after OptimisticLockingFailure. This will of course override all uncommitted changes on those objects, but this may be exactly what you want. Andrus On Apr 19, 2007, at 6:29 PM, Ayhan Kondoz wrote: Hi, i

Re: Validation problem

2007-04-22 Thread Andrus Adamchik
Hi Landry, It could be possible that there is another instance of 'Performer' created as a side effect of some other operation. One way to verify this is to inspect a list of dirty objects returned from 'DataContext.newObjects()' method right before commit. Another place to check for

Re: AW: postgres, idle in transaction

2007-04-24 Thread Andrus Adamchik
is not closed. It is returned to the pool instead. Still looks like a driver bug to me. Andrus On Apr 24, 2007, at 5:03 PM, Oilid Adsi wrote: Hi again, -Ursprüngliche Nachricht- Von: Andrus Adamchik [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 24. April 2007 12:23 An: user

Re: AW: postgres, idle in transaction

2007-04-24 Thread Andrus Adamchik
On Apr 24, 2007, at 5:17 PM, Andrus Adamchik wrote: Interesting... Looking at your log I see this: 15:33:08.267 (2) FE= Parse(stmt=S_1,query=BEGIN,oids={}) . 15:33:08.268 (2) FE= Parse(stmt=null,query=SELECT 15:33:28.461 (2) FE= Parse(stmt=S_2,query=COMMIT,oids={}) So

Re: postgres, idle in transaction

2007-04-24 Thread Andrus Adamchik
much hope this will fix it... but still worth a try. Andrus On Apr 24, 2007, at 5:28 PM, Oilid Adsi wrote: -Ursprüngliche Nachricht- Von: Andrus Adamchik [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 24. April 2007 16:21 An: user@cayenne.apache.org Betreff: Re: AW: postgres, idle

Re: AW: AW: postgres, idle in transaction

2007-04-26 Thread Andrus Adamchik
On Apr 26, 2007, at 1:14 PM, Oilid Adsi wrote: Or maybe by adding an explicit COMMIT after every SELECT- Statement when the connection will be returned to the pool? Can this implemented as an optional function to the Cayenne framework? Per your comment the patch doing rollback didn't help,

Re: user-defined transactions

2007-04-26 Thread Andrus Adamchik
On Apr 26, 2007, at 1:04 PM, Jens Mayer wrote: (Here is the first question: is it possible to bind two different transactions to the same thread?) No you can't. I am accessing two different db-schemas at the same time, using two DataDomains, one for each schema. Now I want to update data

Re: CayenneDataObject missing from 2.0.2 cayenne-client-nodeps.jar

2007-04-26 Thread Andrus Adamchik
Hi, Since you mentioned war, I assume you are deploying a web application. So you should be using cayenne-nodeps.jar, not cayenne- client-nodeps.jar. Andrus On Apr 26, 2007, at 6:03 PM, Giulio Cesare Solaroli wrote: Hello everybody, I was trying to trim the size of my application war

Re: Error: Parameter #1 has not been set

2007-05-09 Thread Andrus Adamchik
On May 9, 2007, at 11:32 PM, Alejandro Daniel Toffetti wrote: I'm getting lots of incompatible types errors in sentences such as: List rows = context.performQuery(query); I have very little experience with NetBeans, but something tells me this is about JDK 1.5 generics. Essentially

Re: complex query and SQLtemplate

2007-05-14 Thread Andrus Adamchik
Hi Marcin, Initially I thought the query may be losing a parameter $joinClause, but then the SQL at the DB level would look like SELECT ... FROM ROOM join ORDER BY Room.name The join word is not a parameter and is instead hardcoded in your template, right? And still does not show up in

Re: Stored procedure question ?

2007-05-14 Thread Andrus Adamchik
This doesn't make sense to me either. So what happens of you remove the first parameter and set returningValue to false? Andrus On May 14, 2007, at 4:58 PM, Marc Gabriel-Willem wrote: procedure name=spViewCustomer schema=dbo returningValue=true procedure-parameter name=returnValue

Re: Stored procedure question ?

2007-05-15 Thread Andrus Adamchik
= context.performGenericQuery(query); ... The exception: Caused by: java.sql.SQLException: Operand type clash: int is incompatible with cursor ... For information, I'm using the JTDS 1.2 driver. Thank you for your help. Regards, Marc -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED

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

2007-05-15 Thread Andrus Adamchik
On May 15, 2007, at 12:47 AM, Tomi N/A wrote: Reduced the max number of objects to 1000. The result? A NPE at: for (MyClassC mcc : (ListMyClassC)mca.getToMyClassC().getToParentClass ().getMyClassCArray()) { Ok, so the cache size will have to be big enough to hold all

[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: 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 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 Andrus Adamchik
, 2007, at 8:23 PM, Frank wrote: 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

Re: Should localObject() traverse the whole graph?

2007-05-18 Thread Andrus Adamchik
Hi Kevin, 'localObject' is not moving objects, between contexts. Instead it locates an object counterpart (another copy) in the target context, instantiating a fault if needed. In light of that your question about graph traversal is probably not relevant. Andrus On May 18, 2007, at

Re: Should localObject() traverse the whole graph?

2007-05-18 Thread Andrus Adamchik
On May 18, 2007, at 8:13 PM, Kevin Menard wrote: The section in the docs titled Moving Objects Between Contexts may be better named as well. Agreed. The moving emphasis is wrong. Maybe the correct solution is to finally make it possible to associate two unregistered data objects and

Re: Behavior of remove(object) on ToManyList

2007-05-30 Thread Andrus Adamchik
30, 2007, at 6:20 AM, Kevin Menard wrote: -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 5:52 AM To: user@cayenne.apache.org Subject: Re: Behavior of remove(object) on ToManyList Hi Alex, Well, actually one of Cayenne responsibilities

Re: Not all values are saved

2007-05-30 Thread Andrus Adamchik
From your description the flow of events is not quiet clear, but my guess is that you haven't defined the mapping for the corresponding obj-attribute's - hasIndex, hasWkn, wknisin. One way to do it is to select the Clip ObjEntity and click on the Sync ObjEntity with DbEntity button (a

Re: UTF8 problem

2007-06-01 Thread Andrus Adamchik
I still suspect that this is a JDBC or MySQL problem, not Cayenne. Here is another URL parameter you may try: useUnicode=true. Also you may want to doublecheck whether database was configured to support UTF-8. Enter mysql prompt and do something like this: use mydb; status; This should

Re: UTF8 problem

2007-06-03 Thread Andrus Adamchik
On Jun 2, 2007, at 9:43 PM, marco turchi wrote: | summary | longtext | utf8_general_ci | YES | | description | longtext | utf8_general_ci | YES | I believe the third column is collation, not encoding; so encoding is still latin. My idea is that the data are encoding

Re: Creating Compound PKs

2007-06-04 Thread Andrus Adamchik
Hi John, A question - is serverid a foreign key to another table by any chance? Andrus On Jun 4, 2007, at 9:09 AM, John Armstrong wrote: Does Cayenne allow for the creation of a compound PK? I searched the archives and google more generally and could only find hints at this. The docs did

Re: performing count

2007-06-04 Thread Andrus Adamchik
On Jun 2, 2007, at 4:29 AM, Michael Gentry wrote: Well, it would work without you providing a DataContext by creating a default DataContext and using it (obviously, only useful if the model is simple -- hence also needing a version where you provide the DataContext to use). I wouldn't even

Re: performing count

2007-06-04 Thread Andrus Adamchik
key in the returned map. Andrus On Jun 4, 2007, at 10:30 AM, Lachlan Deck wrote: Hi there, On 04/06/2007, at 5:05 PM, Andrus Adamchik wrote: We do have utility classes already, like DataObjectUtils (which are mainly containers for static methods -- aka functions). This would be a real

Re: performing count

2007-06-04 Thread Andrus Adamchik
On Jun 4, 2007, at 10:46 AM, Lachlan Deck wrote: Will the DataObjectUtils.intValueForQuery work with 3 tier also? It should. You can look at the sources of the current DataObjectUtils.objectForQuery - the new method is really just an extension of it. Andrus

Re: Serialization of datacontext

2007-06-04 Thread Andrus Adamchik
Could you please open a bug report? We'll need to do some testing to settle on the best strategy (I am leaning towards not serializing the local DataRowStore at all, and rebuilding it on deserialization instead). Thanks Andrus On Jun 4, 2007, at 11:46 AM, bob wrote: Hi I debugged this

Re: Cayenne with PerUserPoolDataSource

2007-06-04 Thread Andrus Adamchik
Hi Emilian, It these some way to make Cayenne use this (basically DataSource.getConnection(user,password) instead of DataSource.getConnection()) ? Not out-of-the-box. But you can achieve that via a custom DataSource wrapper that channels DataSource.getConnection() to

Re: SQLTemplate not faulting an object

2007-06-05 Thread Andrus Adamchik
Yeah, capitalization mismatch between the default DB behavior and your mapping can bite you when you use select *. You may have to use the #result directive to describe all your columns: http://cayenne.apache.org/doc/scripting-sqltemplate.html Since this is a pretty common and annoying

Re: performing count

2007-06-05 Thread Andrus Adamchik
reasoning (although might be more convenient on users). As to not having a fetch method in a query class, I'm fine with that. I was asking for opinions, after all. Thanks, /dev/mrg On 6/4/07, Andrus Adamchik [EMAIL PROTECTED] wrote: On Jun 4, 2007, at 5:06 PM, Michael Gentry wrote

Re: Select Query on Table with no Primary Key

2007-06-07 Thread Andrus Adamchik
Tore is right - for Cayenne to handle an object (whether read-only on read/write), it needs to know which column or columns uniquely identify each row. Now... you can fake a PK in your model, even if there's none in the db - just select a really unique combination of columns, and mark

Re: Select Query on Table with no Primary Key

2007-06-07 Thread Andrus Adamchik
: FIRST_NAME, LAST_NAME, DATE_OF_BIRTH, DEPARTMENT_ID. Works well with views or tables (updateable or read-only) on any DB. Andrus On Jun 7, 2007, at 1:29 PM, Andrus Adamchik wrote: Tore is right - for Cayenne to handle an object (whether read-only on read/write), it needs to know which column

Re: Select Query on Table with no Primary Key

2007-06-08 Thread Andrus Adamchik
On Jun 8, 2007, at 7:01 AM, Craig L Russell wrote: Just FYI, when JDO reads data from tables without PK, it internally creates a unique id, similar to a generated PK, for the objects that it reads and these ids are discarded when no longer needed. The fact that the mapping is for tables

Re: Select Query on Table with no Primary Key

2007-06-08 Thread Andrus Adamchik
. It would be good if Cayenne had some options which allowed for no primary keys but made you aware you would lose some functionality. As mentioned before I've got round the problem for this project but next time it might not be so easy. Cheers, Dave Andrus Adamchik wrote: Hi Craig, I can

Re: SQLTemplate not faulting an object

2007-06-08 Thread Andrus Adamchik
Just checked this in to 3.0 branch (with Modeler support): https://issues.apache.org/cayenne/browse/CAY-800 so you'll be able to do this for instance: sqlTemplate.setColumnNamesCapitalization (SQLTemplate.UPPERCASE_COLUMN_NAMES) Andrus On Jun 5, 2007, at 2:38 PM, Andrus Adamchik

Re: How to set setEndToEndMetrics through Cayenne

2007-06-12 Thread Andrus Adamchik
to be able to call the 'setEndToEndMetrics' method on it. Any ideas? Thanks, Daniel Andrus Adamchik wrote: The other day I posted a DataSource customization advice in reply to a different question: http://objectstyle.org/cayenne/lists/cayenne-user/ 2007/06/0039.html This approach

Re: Wikipedia Cayenne page is gone

2007-06-13 Thread Andrus Adamchik
Yeah would be nice if somebody following this community, but with an outside view could contribute to make it more encyclopedia style. Andrus On Jun 12, 2007, at 2:39 AM, Aristedes Maniatis wrote: On 06/06/2007, at 8:56 AM, Aristedes Maniatis wrote: I'll have a go at reinstating it and

Re: paged query slow when fetching big lists

2007-06-22 Thread Andrus Adamchik
Hi Marcin, * fetch only Pk columns and create all ObjectIds at once, get rid of the iterating process if possible * use already existing method resolveInterval() to fault the required range of records This strategy was discussed in the May thread with Ari (the one that Michael Gentry

Re: Relationships across databases

2007-06-25 Thread Andrus Adamchik
On Jun 21, 2007, at 6:15 PM, Mike Kienenberger wrote: but there's no reason that Cayenne could not attempt to solve it down the road. +1. I think we can devise a sensible algorithm along the following lines: * Split the qualifier into DB-specific parts * Fetch the root entity with its

Re: paged query slow when fetching big lists

2007-06-26 Thread Andrus Adamchik
are moving away from netbeans as a development platform. Marcin On 23/06/2007, at 5:38 PM, Andrus Adamchik wrote: Ari, Marcin -- going through the code I noticed one inefficiency - the elements array access is synchronized in 'fillIn' method. Since 'fillIn' is called from constructor

Re: paged query slow when fetching big lists

2007-06-26 Thread Andrus Adamchik
, at 5:39 PM, Andrus Adamchik wrote: Hi Marcin, 1) SelectQuery(Student.class) with page size 10 takes 30-50 seconds. 2) SQLTemplate(Student.class, SELECT #result('id' 'int') from STUDENT) without paging takes 100 sec. 3) SQLTemplate(Student.class, SELECT #result('id' 'int') from STUDENT

Re: Exception: No property for arcId

2007-06-27 Thread Andrus Adamchik
Could you doublecheck the model making sure the 'toDepartmentPrefix' relationship is still mapped? I often get similar errors when I forget to refresh the source tree in Eclipse after changing the mapping in the Modeler. Andrus On Jun 26, 2007, at 5:20 PM, Michael Lepine wrote: Hello

Re: 1.2.1: Loosing references to 1 to 1 reference objects

2007-06-27 Thread Andrus Adamchik
Hmm... nothing obvious comes to mind. If you watch the SQL logs generated by Cayenne, is there an attempt to fetch Specification in step 2? Andrus On Jun 25, 2007, at 5:45 PM, [EMAIL PROTECTED] wrote: Hi, sometimes we are loosing references to one to one reference in Cayennen objects.

Re: Error when main class is executed

2007-06-27 Thread Andrus Adamchik
Sorry for the late reply. So do you have a Gallery entity in your mapping? Andrus On Jun 20, 2007, at 12:05 PM, janesh wrote: Hi I followed the tutorial to understand the tool. It went fine till main class is executed after adding artists etc. Following error message appears and looks like

Re: Self-join

2007-06-27 Thread Andrus Adamchik
Just to clarify, CAY-732 is a real bug, but it is not a bug with relationships to same entity per se (those resolve just fine). This is a bug specifically related to *prefetching* on such relationships. Andrus On Jun 12, 2007, at 10:33 PM, Mike Kienenberger wrote: Not really sure as I

Re: Self-join

2007-06-27 Thread Andrus Adamchik
Or actually ... I take it back :-) The underlying cause is still the inability to build correct joins when traversing a multi-step path qualifier, such as parent.parent = null. This explains why Mike's patch made a difference. Andrus On Jun 27, 2007, at 4:50 PM, Andrus Adamchik wrote

Re: AW: paged query slow when fetching big lists

2007-06-28 Thread Andrus Adamchik
such a support! -Ursprüngliche Nachricht- Von: Andrus Adamchik [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 28. Juni 2007 10:11 An: user@cayenne.apache.org Betreff: Re: paged query slow when fetching big lists Fixed. Now the things are fast on the client as well. Andrus On Jun 28, 2007

Re: getting started

2007-06-28 Thread Andrus Adamchik
; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Do you think I should remove the java package from the fedora software manager, and manually install the JDK? Thanks, Jack Andrus Adamchik wrote: Hi Jack, All

Re: ERROR No property for arcId toXyz...

2007-06-29 Thread Andrus Adamchik
On Jun 29, 2007, at 8:49 AM, David Norwood wrote: BeanUtils.copyProperties(aDetail, aPlanItem); I suspect this line copes ObjectId from another object, so Cayenne is confused about the nature of the object. Andrus

Re: Cayenne in a Cluster environment ends up in NullPointerException [RESOLVED]

2007-07-03 Thread Andrus Adamchik
Cool, I was gonna suggest to try a few random things, but sometimes its worth waiting for the issue to resolve itself :-) Andrus On Jul 3, 2007, at 7:08 PM, Eric BIANCHI wrote: Hello list, Cayenne was sending me a NullPointerException in a Cluster because I had 2 differents datacontexts

Re: paged query slow when fetching big lists

2007-07-05 Thread Andrus Adamchik
3.0 (SVN trunk), which will hopefully be released fairly soon as 3.0M1 Andrus On Jul 5, 2007, at 3:06 PM, Borut Bolčina wrote: Hello, which version includes this corrections? 2.0.3 or 3.0? Thanks, Borut On 26.6.2007 20:32, Andrus Adamchik wrote: Hi Marcin, I have good news (I think

Re: How to create cayenne datamap on the fly

2007-07-07 Thread Andrus Adamchik
Hi there, Actually Cayenne is one of the few ORM engines where you can define both your metadata, and persistent objects on the fly if you want to. So... 1. While I never tried loading DataMap XML from a remote URL, it should work. Just subclass

  1   2   3   4   5   6   7   8   9   10   >