Re: Cayenne in j2ee - message beans

2008-03-18 Thread Andrus Adamchik
Jarrel wrote: Thank you for the quick reply. I know I should probably do some of my own profiling, but is the process of creating a new datacontext expensive computation wise? Thank you! Gary On Tue, Mar 18, 2008 at 4:55 AM, Andrus Adamchik [EMAIL PROTECTED] wrote: The simplest thing

Google Summer of Code 2008

2008-03-19 Thread Andrus Adamchik
Any students out there? Google Summer of Code program starting now [1]. We (myself as a formal mentor, and other committers informally) will be mentoring at least one project [2] this year, so it is a chance for a student to: * participate in a fun Apache open source project * make a

Re: EJBQL: Fetch joins are not yet supported.

2008-03-25 Thread Andrus Adamchik
Hi there, On Mar 25, 2008, at 5:28 PM, Laszlo Sas wrote: Hello, I want to use left join fetch, but currently Cayenne throws the following Exception: java.lang.UnsupportedOperationException: Fetch joins are not yet supported Does Cayenne support outer joins (I think about a non-EJBQL

Re: EJBQL: Fetch joins are not yet supported.

2008-03-25 Thread Andrus Adamchik
On Mar 25, 2008, at 5:31 PM, Andrus Adamchik wrote: Does Cayenne support outer joins (I think about a non-EJBQL support)? Yes, but not the fetch joins. Sorry... non-EJBQL queries (i.e. SelectQuery) does not support outer joins (there are some patches in Jira to support

Re: DataObjectUtils.objectForPK

2008-03-26 Thread Andrus Adamchik
Doesn't look like a bug. Just an indicator that something needs to be recompiled. Andrus On Mar 26, 2008, at 2:04 AM, Malcolm Edgar wrote: Hi All, I have been having issues with using Cayenne 3.0M3 DataObjectUtils method objectForPK(ObjectContext, Class, Object) Caused by:

Re: Crash when reconnecting to MySQL (3.0M3)

2008-03-26 Thread Andrus Adamchik
Are you using autoReconnect=true parameter in the MySQL connection URL? Thanks, Andrus On Mar 26, 2008, at 10:44 AM, Alexander Lamb wrote: Hello List, We have an application, deployed successfully with Tapestry 5.0.11 and Cayenne 3.0M3 on Tomcat 6 with MySQL 5.0. Everything is fine

Re: Crash when reconnecting to MySQL (3.0M3)

2008-03-26 Thread Andrus Adamchik
tried catching an exception at one place but then the exception appeared at some other place). Alex Le 26 mars 08 à 10:27, Andrus Adamchik a écrit : Are you using autoReconnect=true parameter in the MySQL connection URL? Thanks, Andrus On Mar 26, 2008, at 10:44 AM, Alexander Lamb wrote

Re: How to propoerly close context db connection

2008-03-31 Thread Andrus Adamchik
Cayenne itself works with a DataSource. All connection management and starting and stopping the embedded DB is deferred to the DataSource and is beyond Cayenne scope. The default DataSource implementation pools connections. If you need a different policy, you need to provide a DataSource

Re: How to propoerly close context db connection

2008-04-01 Thread Andrus Adamchik
appreciated. Cheers, Colin. Andrus Adamchik wrote: Cayenne itself works with a DataSource. All connection management and starting and stopping the embedded DB is deferred to the DataSource and is beyond Cayenne scope. The default DataSource implementation pools connections. If you need a different

Re: Paging in web application

2008-04-02 Thread Andrus Adamchik
Hi Malcolm, Here they are: (3.0M1) https://issues.apache.org/cayenne/browse/CAY-810 (3.0M4, unreleased) https://issues.apache.org/cayenne/browse/CAY-999 There are also a few other jiras that dealt with proper caching support for paginated lists. Andrus On Apr 2, 2008, at 12:59 PM,

Re: How can I customize the driver/url/login

2008-04-03 Thread Andrus Adamchik
In the Modeler there is a dropdown for the DataNode called DataSource Factory. Here you can specify your own class that implements org.apache.cayenne.conf.DataSourceFactory interface. Your own factory can implement 'getDataSource' method to pop up a dialog asking user to enter DB info on

Re: How can I customize the driver/url/login

2008-04-03 Thread Andrus Adamchik
Source) ... 30 more Any ideas? Thanks so much. -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 10:11 AM To: user@cayenne.apache.org Subject: Re: How can I customize the driver/url/login In the Modeler there is a dropdown

Re: How can I customize the driver/url/login

2008-04-03 Thread Andrus Adamchik
I'm using a custom DataSourceFactory now; So how does this code look like? There's something in the DataSource it returns that results in the errors you've mentioned. Andrus On Apr 3, 2008, at 7:18 PM, Scott Anderson wrote: I'm using a custom DataSourceFactory now; if I switch it back

Re: Stored proc returning result set (and output params) with MS SQL server

2008-04-11 Thread Andrus Adamchik
Hi Marc Gabriel, For information, using JDBC directly the situation is handled correctly. Could you post the JDBC code you used to read the data? Andrus On Apr 10, 2008, at 3:36 PM, Marc Gabriel-Willem wrote: Dear all, First of all, thank you for your great product. We are using

Re: Replace Objects in a Database?

2008-04-14 Thread Andrus Adamchik
no estimates... still nearest future ;-) On Apr 14, 2008, at 4:52 PM, Borut Bolčina wrote: Andrus, what is the status of this merge functionality? Any estimates? Thanks, Borut 2007/11/29 Andrus Adamchik [EMAIL PROTECTED]: In the nearest future we'll be adding a merge method

Re: EJBQL problem

2008-04-16 Thread Andrus Adamchik
Looks like a Cayenne bug to me... t2 is nowhere to be found in the translated query. besides a join to manufacturer should probably be an OUTER JOIN. Would you mind opening a bug report please? https://issues.apache.org/cayenne/ Thanks, Andrus On Apr 16, 2008, at 6:24 PM, Jeff Pierson

Re: Stored proc returning result set (and output params) with MS SQL server

2008-04-17 Thread Andrus Adamchik
So Cayenne calls the sp in the following format: {? = call spXXX(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)} In your JDBC test you do it like this: { call spXXX(?, ?, ?, ?, ?, ?, ?, ?, ?, ?) } I.e. no return value is specified. So what if you uncheck returning value checkbox for this stored

Re: Cayenne Modeler Plugin State Changes?

2008-04-17 Thread Andrus Adamchik
AFAIK no work has been done on that to date. No spare bandwidth :-/ Andrus On Apr 17, 2008, at 4:44 PM, Gustav Weber wrote: Are there any changes to the state of the plugin support in cayenne modeler? Is there a final framework decided? Or maybe an internal solution? Or maybe there are new

Re: Mysql and usernames

2008-04-20 Thread Andrus Adamchik
It is not *cayenne* that denies access. It is MySQL server. So that's where you need to look. Check for instance that reverse DNS from machine B works for machine A, or enter machine A IP address in the access table. Andrus On Apr 19, 2008, at 12:15 AM, Ozakca, Muzaffer wrote: Hi, I

Re: newbie question

2008-04-22 Thread Andrus Adamchik
2007/10/9 Andrus Adamchik [EMAIL PROTECTED]: Hi Jan, Looks like what you need is a SQLTemplate query: http://cayenne.apache.org/doc/sqltemplate-query.html Here is a mockup code example: SQLTemplate q = new SQLTemplate(SomeClass.class, select MAX(id) from table); q.setFetchingDataRows(true

Re: newbie question

2008-04-22 Thread Andrus Adamchik
On Apr 22, 2008, at 4:33 PM, Borut Bolčina wrote: String ejbql = SELECT max(id) FROM Event; Try SELECT max(e.id) FROM Event e... Using entity aliases seems to be required by the EJBQL spec which Cayenne tries to follow. Andrus

Re: Is Expression

2008-04-29 Thread Andrus Adamchik
Try this: Expression expression = ExpressionFactory.matchExp(actif, Boolean.TRUE); I don't remember how good was the boolean support in 2.0.x, but the above works for me with Cayenne 3.0 and MySQL 5 rather well. Andrus On Apr 29, 2008, at 11:34 AM, Support Technique C3T wrote: Hi

Re: Error when adding and then removing object from relationship before committing

2008-04-30 Thread Andrus Adamchik
Hi Brian, On Apr 30, 2008, at 8:04 AM, Brian Nelson wrote: Let me start this post by thanking the Cayenne dev team for their great work. The project I'm working on switched from Hibernate to Cayenne several months ago. I can honestly say the decision to switch is one of the best things

Re: Is Expression

2008-04-30 Thread Andrus Adamchik
On Apr 30, 2008, at 5:57 PM, Michael Gentry wrote: Andrus, I was thinking someBoolean = true (or false) would work, but it doesn't. However, it does work if you evaluate the expression: expression = Expression.fromString(isActive = $value); parameters = new HashMapString, Boolean(1);

Re: Is Expression

2008-04-30 Thread Andrus Adamchik
Looking at the code, looks like it only works as a standalone condition, e.g. a = 1 and true: https://issues.apache.org/cayenne/browse/CAY-696 So yeah, boolean literals are not supported as condition operands :-/ Anyone else encountering an SVN issue right now? It's been up and down

Re: Custom configuration class ignored in 3.0 snapshot

2008-05-02 Thread Andrus Adamchik
Strange. That should still work the same. The only change to Configuration since M3 was related to the DataSourceFactory handling (CAY-785)... Do you have a code example that demonstrates the problem? Thanks, Andrus On May 1, 2008, at 10:29 PM, Brian Nelson wrote: I've been using a custom

Re: Custom configuration class ignored in 3.0 snapshot

2008-05-03 Thread Andrus Adamchik
--- Andrus Adamchik [EMAIL PROTECTED] wrote: Strange. That should still work the same. The only change to Configuration since M3 was related to the DataSourceFactory handling (CAY-785)... Do you have a code example that demonstrates the problem? Thanks, Andrus On May 1, 2008, at 10:29 PM

Fwd: Query.setRefreshingObjects(boolean)

2008-05-03 Thread Andrus Adamchik
Begin forwarded message: From: Andrus Adamchik [EMAIL PROTECTED] Date: April 18, 2008 12:02:27 AM GMT+03:00 To: [EMAIL PROTECTED] Subject: Query.setRefreshingObjects(boolean) Reply-To: [EMAIL PROTECTED] Anyone's using SomeQuery.setRefreshingObjects(false)? I haven't been using this since WebObjects

Re: Query.setRefreshingObjects(boolean)

2008-05-03 Thread Andrus Adamchik
On May 3, 2008, at 6:57 PM, Andrus Adamchik wrote: a set of queries with a large # of combinations of parameters, but all searching the same underlying data set that rarely changes On the other hand, even this example is better served by using query cache. For a marginal increase

Re: Can't perform lookup. There is more than one ObjEntity mapped to class

2008-05-05 Thread Andrus Adamchik
Hi Hans, This may be a genuine error (i.e. you do have two entities that are mapped to the same Java class). Although the fact that it goes away in 3.0 makes me wonder if there is a bug in 2.0.4 EntityResolver. In 3.0 it is much more robust to various cross-ClassLoader and arbitrary

Re: Invalidating cache from external process?

2008-05-05 Thread Andrus Adamchik
for java-to-java invalidation I successfully used OSCache with JGroups. For non-java apps that change the data there are a few options: 1. A private URL in a webapp that a script can access that would cause cache invalidation 2. A timer local to the app that checks a special table in DB that

Re: Can't perform lookup. There is more than one ObjEntity mapped to class

2008-05-05 Thread Andrus Adamchik
Umm, sorry you already said that you don't have doubly mapped class... So what environment are you using for deployment? I am wondering if there is some special ClassLoader setup involved. Andrus On May 5, 2008, at 11:28 AM, Andrus Adamchik wrote: Hi Hans, This may be a genuine error

Re: Can't perform lookup. There is more than one ObjEntity mapped to class

2008-05-05 Thread Andrus Adamchik
in session restoring. Thank you for your time Hans On Mon, 5 May 2008 11:34:34 +0300, Andrus Adamchik wrote Umm, sorry you already said that you don't have doubly mapped class... So what environment are you using for deployment? I am wondering if there is some special ClassLoader setup involved

Re: Query.setRefreshingObjects(boolean)

2008-05-05 Thread Andrus Adamchik
compilation/runtime breaks) or have it continue to function (@deprecated with BIG warnings in the logs). I'd hate to be a developer who misses this in the release notes after upgrading some application, and then tries to figure out why things don't work as expected any more... On 5/3/08, Andrus Adamchik

Re: Query.setRefreshingObjects(boolean)

2008-05-05 Thread Andrus Adamchik
On May 5, 2008, at 10:39 PM, Mike Kienenberger wrote: To me, that sounded like you were going to change the behavior rather than just mark the method as @deprecated. I was planning to do both. Although we may decide to be gentle about it and deprecate the method, but preserve the

Re: Query.setRefreshingObjects(boolean)

2008-05-05 Thread Andrus Adamchik
/08, Andrus Adamchik [EMAIL PROTECTED] wrote: On May 5, 2008, at 10:39 PM, Mike Kienenberger wrote: To me, that sounded like you were going to change the behavior rather than just mark the method as @deprecated. I was planning to do both. Although we may decide to be gentle about

Re: Newbie question about to-many ordered list

2008-05-06 Thread Andrus Adamchik
As a side note pre-ordered relationships have been on our TODO list for some time. Since it is a JPA feature, it is higher priority now. Andrus On May 6, 2008, at 10:52 AM, Malcolm Edgar wrote: I tend to do this: public ListCustomer getCustomers() { ListCustomers customers =

Re: Commit with validation errors in detail table

2008-05-07 Thread Andrus Adamchik
Hi Julien, Yes, DataContext commit is all or nothing. One possible way to go about it is to catch the ValidationException, iterate through the list of failures collecting source objects of all failures. Then do DataContext.invalidateObjects(failed) and retry the commit. Andrus On May 6,

Re: Commit with validation errors in detail table

2008-05-08 Thread Andrus Adamchik
On May 7, 2008, at 11:32 AM, Fixe106 wrote: Thank you for your trick Andrus But DataContext.invalidateObjects(failed) does not work because cayenne tries to recommit all the same objects I looked at the code ... yeah, invalidate.. ignores NEW objects, which may be a bad idea on Cayenne's

Re: chaining and chunking

2008-05-12 Thread Andrus Adamchik
No you can't. #chunk doesn't work as a full #if condition. Andrus On May 9, 2008, at 5:39 PM, Dan Morgan wrote: I know that you can chunk as follows: #chunk($somevalue) A = $somevalue #end but can you chunk like: #chunk($somevalue 10) A $somevalue #end Thanks, Daniel L. Morgan EMail

Re: bug in M4

2008-05-13 Thread Andrus Adamchik
Doh! I'll investigate tonight. Andrus On May 13, 2008, at 1:31 PM, Marcin Skladaniec wrote: Hi We have updated to M4 and since then this exception started to show up (for some entities only) : [java] org.apache.cayenne.CayenneRuntimeException: [v.3.0-SNAPSHOT May 13 2008 16:16:55]

Re: relationship query and cache refreshing in 3tier cayenne

2008-05-13 Thread Andrus Adamchik
From what I see the problem is that RefreshQuery is not propagated to remote clients. LOCAL_CACHE is local the tier where the query originated. With some fixes in M4, this statement is true for both nested contexts and ROP... Since by default there are no events pushed from the server to

Re: relationship query and cache refreshing in 3tier cayenne

2008-05-14 Thread Andrus Adamchik
On May 14, 2008, at 4:06 AM, Marcin Skladaniec wrote: [1] - re-doing selectquery in different client seems to work! Andrus this opposes to what you have said about the RefreshQuery propagation! Weird... This means that caching is not working for some reason. Andrus

Re: bug in M4

2008-05-14 Thread Andrus Adamchik
Fixed. On May 13, 2008, at 2:16 PM, Andrus Adamchik wrote: Doh! I'll investigate tonight. Andrus On May 13, 2008, at 1:31 PM, Marcin Skladaniec wrote: Hi We have updated to M4 and since then this exception started to show up (for some entities only) : [java

Re: Deadlock between commitChanges and snapshotsUpdatedForObjects

2008-05-15 Thread Andrus Adamchik
Hmm... I don't see a deadlock, just a contention with other threads waiting for userDataBeanMessageListener-5 to finish commit. So does it result in slowness or a complete deadlock? (there are known issues with nested contexts [1], but there weren't any with the top-level contexts in a

Re: Deadlock between commitChanges and snapshotsUpdatedForObjects

2008-05-16 Thread Andrus Adamchik
lock per this Jira: https://issues.apache.org/cayenne/browse/CAY-722 Alternatively you may attempt to patch 1.2 based on CAY-722 diff: http://tinyurl.com/56ja5r Andrus On May 16, 2008, at 3:08 AM, Martin Thelian wrote: Hi! Andrus Adamchik schrieb: Hmm... I don't see a deadlock, just

Re: Deadlock between commitChanges and snapshotsUpdatedForObjects

2008-05-16 Thread Andrus Adamchik
On May 16, 2008, at 7:45 AM, Andrus Adamchik wrote: it is still not clear how exactly thread 5 locks that PostgreSQL table I mean thread 1 of course. Thread 5 is the one getting stuck. Andrus

Re: one-to-many problem

2008-05-16 Thread Andrus Adamchik
if someone could point me at an example of how you normally do it. -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Friday, May 16, 2008 11:33 AM To: user@cayenne.apache.org Subject: Re: one-to-many problem Sorry I didn't have a chance to investigate this more deeply. I

[POLL] loading XML configurations from filesystem

2008-05-20 Thread Andrus Adamchik
Wanted to check if anybody loads cayenne.xml and related Map and Node XML files from locations other than default two: CLASSPATH and WEB-INF/ ? More specifically: 1. anybody uses FileConfiguration? 2. anybody uses DefaultConfiguration (with 'addResourcePath' or without) to directly

Re: [POLL] loading XML configurations from filesystem

2008-05-20 Thread Andrus Adamchik
On May 20, 2008, at 8:33 PM, Kevin Menard wrote: I have all of my Persistent objects in one module that bundles up the DataMap. Each app that uses them provides its own DataNode. It makes deployment to different environments really nice. It also lets me swap out test and production

Re: [POLL] loading XML configurations from filesystem

2008-05-20 Thread Andrus Adamchik
application. To answer your question I've used 1,2 and 3 at various times when it was appropriate to compromise on the ideal world solution. Phil -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: 20 May 2008 15:39 To: user@cayenne.apache.org Subject: [POLL

Re: Cayenne and JAX-WS / JAXB

2008-05-27 Thread Andrus Adamchik
I never used JAXB, although I evaluated it briefly in the past. With everyone gradually moving to Java 6, it probably warrants a closer looks from us in Cayenne. More to the point, I think the annotations approach should work, but that will require some experimentation. So try it, and let

Re: getArray matching specific criteria?

2008-05-28 Thread Andrus Adamchik
Hi there, you need an expression matching on relationship. E.g: ExpressionFactory.matchExpression(master, masterObject); where master is the name of relationship. Andrus On May 28, 2008, at 4:45 PM, Garcia Corral, Josep wrote: Hello, Having this: Class Master { int id; ... };

Re: MSSQL + Cayenne - connection problem

2008-05-29 Thread Andrus Adamchik
On May 29, 2008, at 1:45 PM, Michał Morzywołek wrote: Caused by: java.sql.SQLException: Can't obtain connection. Request timed out. Total used connections: 1 at There is a connection leak somewhere... The simplest solution is to set max connections for the DataNode in the Modeler

Re: [ANN] Cayenne 3.0M4 Released

2008-05-30 Thread Andrus Adamchik
On May 30, 2008, at 12:09 PM, Andrus Adamchik wrote: One other thing.Looking at http://cayenne.apache.org/doc/api/org/apache/cayenne/query/DeleteQuery.html , is there a typo in class comment saying: *Deprecated.* *since 3.0. Should be replaced either with EJBQL update query or SQLTemplate

Re: delete from ... where ... in (...)

2008-05-30 Thread Andrus Adamchik
See my other reply - there is actually an EJBQL delete. On May 30, 2008, at 4:27 PM, Borut Bolčina wrote: Hi, what is the C3M4 prefered way of doing this SQL equivalent: DELETE FROM Artist WHERE Oid IN (1,4,8,9); Thanks, Borut

Re: delete from ... where ... in (...)

2008-05-30 Thread Andrus Adamchik
); Is this possible? Or, would it be? Thanks, Borut 2008/5/30 Andrus Adamchik [EMAIL PROTECTED]: See my other reply - there is actually an EJBQL delete. On May 30, 2008, at 4:27 PM, Borut Bolčina wrote: Hi, what is the C3M4 prefered way of doing this SQL equivalent: DELETE FROM Artist

Re: DataContext - new method wanted

2008-06-04 Thread Andrus Adamchik
There's been some effort to keep only the essential non-redundant methods in the ObjectContext interface to make it more flexible for nested/ROP operation and to simplify its proxying. I am neutral to adding the new method to the *DataContext class*, as long as it doesn't make it to the

Re: Bounded fetch limit

2008-06-05 Thread Andrus Adamchik
We should support the starting row in the future 3.0 milestones. For now, yes, the paginated list is one possible workaround. Andrus On Jun 5, 2008, at 11:41 PM, Scott Anderson wrote: Not quite as elegant as what I was hoping for, but that looks like it will do the trick. Thanks, Mike

Re: Bounded fetch limit

2008-06-05 Thread Andrus Adamchik
On Jun 5, 2008, at 11:54 PM, Robert Zeigler wrote: Any word on when? That's a tough one. The implementation is very straightforward (and in fact QueryMetadata already has a method 'getFetchStartIndex', used by ROP). But the list of similar nice-to-have things is rather long... I just

Re: Help! I need the magic no-cache recipe

2008-06-10 Thread Andrus Adamchik
To control relationship refresh you can either use DataContext.invalidateObjects(..) or plan a bit ahead and refresh it together with the query that fetched the root object by using prefetching on that relationship. E.g. someQuery.addPrefetch(relatedRows); List rows =

Re: NamedQuery / SQLTemplate keyPath validation

2008-06-10 Thread Andrus Adamchik
Hi Lachlan, there is nothing there that would let you do that outside the context of query execution. One reason why we never pursued such functionality is because ... well, such context is needed: * you need a place to stick joins as you walk the expression path * you need a way to match

Re: NamedQuery / SQLTemplate keyPath validation

2008-06-10 Thread Andrus Adamchik
On Jun 10, 2008, at 10:31 AM, Lachlan Deck wrote: Perhaps I should describe what I'm actually doing. All I need is a way to get a count of a select query (without having to fault in all the related objects). So is there a way to trigger that, in order to just get a count back, with a

Re: NamedQuery / SQLTemplate keyPath validation

2008-06-10 Thread Andrus Adamchik
+ expression.toEJBQLString(a); Andrus On Jun 10, 2008, at 10:52 AM, Lachlan Deck wrote: Hi Andrus, On 10/06/2008, at 5:37 PM, Andrus Adamchik wrote: On Jun 10, 2008, at 10:31 AM, Lachlan Deck wrote: Perhaps I should describe what I'm actually doing. All I need is a way to get a count of a select

Re: NamedQuery / SQLTemplate keyPath validation

2008-06-10 Thread Andrus Adamchik
IIRC no... But I think we should. Andrus On Jun 10, 2008, at 11:09 AM, Lachlan Deck wrote: On 10/06/2008, at 6:02 PM, Andrus Adamchik wrote: Unlike SQLTemplate, EJBQL operates in object terms, abstracted from SQL (this is why I said earlier that it is similar to SelectQuery). So

Re: NamedQuery / SQLTemplate keyPath validation

2008-06-10 Thread Andrus Adamchik
I need to test it with ROP... Probably a bug, but also likely easy to fix. Andrus On Jun 10, 2008, at 11:17 AM, Lachlan Deck wrote: On 10/06/2008, at 5:37 PM, Andrus Adamchik wrote: On Jun 10, 2008, at 10:31 AM, Lachlan Deck wrote: Perhaps I should describe what I'm actually doing. All I

Re: NamedQuery / SQLTemplate keyPath validation

2008-06-10 Thread Andrus Adamchik
On Jun 10, 2008, at 11:29 AM, Lachlan Deck wrote: Do you need a task? Sure. I'd appreciate that. Andrus

Re: Bug in Expression.toEJBQL with inExpr

2008-06-10 Thread Andrus Adamchik
Thanks for opening a Jira. This may be the symptom of the same problem as the one described in the second part of CAY-1072. We'll take a look. Andrus On Jun 10, 2008, at 1:49 PM, Laurent Marchal wrote: Hi Andrus, I have tested with Cayenne 3.0M4 and there is a bug transforming an

Re: Dynamic database attribute

2008-06-16 Thread Andrus Adamchik
Hi John, Actually a good idea for us to introduce a concept of ant-like dynamic variable substitution in the future. Now back down to Earth... The way to customize that now is via a custom DataSourceFactory class:

Re: Configuring SSL

2008-06-16 Thread Andrus Adamchik
Hi Elena, IIRC, Oracle is the only database that wouldn't allow user properties to be appended to the DB URL (the approach I am using in similar situations for all other DB's). Unless the parenthesis notation allows to pass this property somehow (?), you have two choices: 1. (easy)

Re: Configuring SSL

2008-06-16 Thread Andrus Adamchik
Hi Elena, Here is a (badly written) factory for DBCP: https://svn.apache.org/repos/asf/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/DBCPDataSourceFactory.java You can use a similar approach to properties loading, but then instead of doing what

Re: Cayenne + J2EE5

2008-06-16 Thread Andrus Adamchik
Hi Jone, The provider is alpha quality now (read not finished). So I would hold the switch, or check out Cayenne's classic persistence API, which is quite stable and powerful. Andrus On Jun 16, 2008, at 7:57 PM, Jone Lura wrote: Hi, Is it possible to use Cayenne as the JPA provider for

Re: Configuring SSL

2008-06-18 Thread Andrus Adamchik
No, it is a part of Apache commons-dbcp library: http://commons.apache.org/dbcp Andrus On Jun 18, 2008, at 3:06 PM, Elena Doyle wrote: Andrus, What is DBCP BasicDataSource, please? Is it part of your framework? Elena -Original Message- From: Andrus Adamchik [mailto:[EMAIL

Re: Configuring SSL

2008-06-18 Thread Andrus Adamchik
, (SSL_DH_anon_WITH_3DES_EDE_CBC_SHA, SSL_DH_anon_WITH_RC4_128_MD5, SSL_DH_anon_WITH_DES_CBC_SHA)); return ds; } } -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: 18 June 2008 13:13 To: user@cayenne.apache.org Subject: Re: Configuring SSL

Re: Configuring SSL

2008-06-18 Thread Andrus Adamchik
, 2008, at 6:35 PM, Elena Doyle wrote: Andrus, How can I get to the source code or java doc of the version I am using? I so do not want to go back to Hibernate Elena -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: 18 June 2008 16:31 To: user

Re: Configuring SSL

2008-06-18 Thread Andrus Adamchik
a certain interface (DataSourceFactory). The IDE will generate method placeholders for you by looking at the binary definition of the interface. Andrus On Jun 18, 2008, at 6:51 PM, Andrus Adamchik wrote: Elena, Getting the sources and JavaDocs for any past version wouldn't be a problem, we

Re: Expression question

2008-06-18 Thread Andrus Adamchik
Cayenne 3.0M4 supports outer joins. So you can match against NULL to select objects with no targets over a given relationship. E.g. from Cayenne tests: SelectQuery missingToManyQuery = new SelectQuery(Artist.class); missingToManyQuery.andQualifier(

Re: Migration Guide Cayenne 1.2.X - 3.0 ?

2008-06-19 Thread Andrus Adamchik
Hi Martin, you may check the upgrade notes: http://cayenne.apache.org/doc/upgrade.html Andrus On Jun 19, 2008, at 11:49 AM, Martin Thelian wrote: Hi, is there a migration guide describing how to migrate from cayenne 1.2 to version 3.0? Thanks. Regards, Martin

Re: Configuring SSL

2008-06-19 Thread Andrus Adamchik
in my custom factory everything DriverDataSourceFactory Does? Elena -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: 18 June 2008 17:13 To: user@cayenne.apache.org Subject: Re: Configuring SSL On Jun 18, 2008, at 7:05 PM, Elena Doyle wrote: I currently have

Re: Peak memory usage for Cayenne

2008-06-20 Thread Andrus Adamchik
On Jun 20, 2008, at 10:45 AM, Øyvind Harboe wrote: 1. Consider the code below. Will all the objects from the query be locked in memory? query=new SelectQuery(Foo.class); query.setPageSize(1000); /* does this matter? */ /* Does performQuery return a clever implementation of a List that does

Re: Peak memory usage for Cayenne

2008-06-20 Thread Andrus Adamchik
We thought about automatically swapping out pages from the IncrementalFaultList as it is getting filled. At the time we had doubts about the efficiency of algorithms under consideration in all different circumstances where pagination might be used. Now that I mentioned weak references,

Re: Peak memory usage for Cayenne

2008-06-20 Thread Andrus Adamchik
If we implement swapping out pages, 'setPageSize()' will indeed be the only thing a user would care about. Andrus On Jun 20, 2008, at 11:29 AM, Øyvind Harboe wrote: On Fri, Jun 20, 2008 at 10:26 AM, Andrus Adamchik [EMAIL PROTECTED] wrote: We thought about automatically swapping out pages

Re: Comparing objects

2008-06-20 Thread Andrus Adamchik
#3 is false. ObjectId *instances* are not unique, and require equals comparison. #1 #2 are accurate. Andrus On Jun 20, 2008, at 11:34 AM, Øyvind Harboe wrote: I'm wondering if I've gotten comparsion of objects right. Consider a, b both references to CayenneDataObjects. I want to know

Re: weakly referenced paged queries

2008-06-22 Thread Andrus Adamchik
On Jun 20, 2008, at 10:41 PM, Øyvind Harboe wrote: - the JavaDoc explained *why* the synchronization is there and what it is supposed to do and how the client is supposed to use it. From the class JavaDocs: A synchronized list that serves as a container of DataObjects... A Collection is

Re: RefreshQuery not supports insert/delete?

2008-06-25 Thread Andrus Adamchik
This is a bug. Let me see if there is a quick fix. https://issues.apache.org/cayenne/browse/CAY-1082 Andrus On Jun 24, 2008, at 1:37 PM, Andrey Razumovsky wrote: Hi! I can't figure out how to make the refreshing query work with inserting or deleting rows in database. For instance:

Re: RefreshQuery not supports insert/delete?

2008-06-25 Thread Andrus Adamchik
Fixed. The fix is very similar to Andrey's, only applied inside Cayenne. Andrus On Jun 25, 2008, at 4:26 PM, Andrus Adamchik wrote: This is a bug. Let me see if there is a quick fix. https://issues.apache.org/cayenne/browse/CAY-1082 Andrus On Jun 24, 2008, at 1:37 PM, Andrey Razumovsky

Re: Memory usage and select statements

2008-06-30 Thread Andrus Adamchik
No weak reference, but all relationships are faulted lazily. Andrus On Jun 30, 2008, at 12:30 PM, Øyvind Harboe wrote: On Mon, Jun 30, 2008 at 11:01 AM, Andrus Adamchik [EMAIL PROTECTED] wrote: There is no lazy fetching of attributes (only relationships). We will be adding it at some point

Re: Memory usage and select statements

2008-06-30 Thread Andrus Adamchik
On Jun 30, 2008, at 3:23 PM, Scott Anderson wrote: If I'm not mistaken, using an incomplete SQLTemplate statement will allow fetching of incomplete DataObjects, and Cayenne will not go back to the database again until you try to access unfetched data. In this case Cayenne will create

Re: Exception in SAXParserFactory.newInstance with 3.0M4

2008-06-30 Thread Andrus Adamchik
Seems to be throwing a class not found exception but I can't be sure since it just ungracefully terminates the app with not stack dump. This is unusual for a Java application. What type of application is that and how do you compile and run it? (and yes - SAX parser is part of JDK, and ..

Re: Exception in SAXParserFactory.newInstance with 3.0M4

2008-07-01 Thread Andrus Adamchik
this to the list: Begin forwarded message: From: Jerald Dawson [EMAIL PROTECTED] Date: July 1, 2008 10:49:20 AM CDT To: Scott Anderson [EMAIL PROTECTED] Cc: Andrus Adamchik [EMAIL PROTECTED] Subject: Re: Exception in SAXParserFactory.newInstance with 3.0M4 Thats interesting. Here is my drive.xml file

Re: Exception in SAXParserFactory.newInstance with 3.0M4

2008-07-01 Thread Andrus Adamchik
BTW, I'm using SWT if that is pertinent. It probably is. The ClassLoader settings are likely different. Anyways the code in question does look suspect. I implemented a bit more paranoid version of this method (without actually knowing whether null values are valid here or not). The code is

Re: help: Why is there validation w/ a delete action

2008-07-05 Thread Andrus Adamchik
I don't think delete rules are the cause here. The validation points to the Topic object. Usually this happens when the same context is used for multiple unrelated operations, and not committed/rolledback properly, so there are leftovers from the previous operation in some unpredictable

Re: estimating proper object cache size

2008-07-05 Thread Andrus Adamchik
On Jul 5, 2008, at 8:20 AM, Marcin Skladaniec wrote: During my tests I was fetching 1k, 10k or 100k records using ROP. Select queries with no paging, no query caching. It was always that the first query took a while longer (about 20%), Probably this was due to Cayenne warmup (class

Re: estimating proper object cache size

2008-07-05 Thread Andrus Adamchik
On Jul 5, 2008, at 4:43 PM, Aristedes Maniatis wrote: The query cache is designed to improve performance of SelectQueries returning large result sets Query result cache and object cache are two separate caches. So the docs are correct... at least the quoted text. What do you mean here

Re: CayenneModeler: Superclass Package

2008-07-08 Thread Andrus Adamchik
It should be saved in the local modeler preferences DB per project. But I know what you are talking about - I've seen it misbehave. I think it is a bug in the Modeler. A Jira is appreciated. Andrus On Jul 8, 2008, at 5:46 PM, Joe Baldwin wrote: Where is the CayenneModeler attribute

Re: Unique persistent object and caching issue

2008-07-15 Thread Andrus Adamchik
On Jul 15, 2008, at 4:49 PM, Laurent Marchal wrote: But the thing I don't understand is why when i refetch the Artist object the relationships are not invalidated. By default only the object itself is refreshed. Cayenne has no way of knowing which part of the object graph has changed, so

Re: Unique persistent object and caching issue

2008-07-15 Thread Andrus Adamchik
On Jul 15, 2008, at 6:10 PM, Laurent Marchal wrote: In fact it does a little because the Artist_AUX list is well in sync with the database. But now each time i use the Artist object Cayenne do 1 request for each related Artist_AUX row ! That was the thing i wanted to avoid This is

Re: Unique persistent object and caching issue

2008-07-15 Thread Andrus Adamchik
Could you check the To Dep PK checkbox for this relationship and see if that makes a difference. Andrus On Jul 15, 2008, at 6:43 PM, Laurent Marchal wrote: db-relationship name=toMasterScheduleAux source=SNAME target=SNAME_AUX toMany=true db-attribute-pair source=SKDID target=SKDID/

Re: Can't extract a master key

2008-07-31 Thread Andrus Adamchik
Hi Dave, MyDataObject is likely mapped to get its PK from the related master object. The exception means that the master object does not yet have a PK yet when MyDataObject is committed. So how is the PK generation set for the master object entity? Are you using auto-incremented PKs by

Re: Update in cascade

2008-08-01 Thread Andrus Adamchik
I guess the Cayenne way in this situation would be to clone an object subtree with a new PK and delete the old subtree. I.e. INSERT/ DELETE vs UPDATE. Fro the reasons that Ari stated - it is assumed that object identity is never changed. Andrus On Aug 1, 2008, at 9:47 AM, Francois Eyl

<    1   2   3   4   5   6   7   8   9   10   >