Re: ProcedureQuery problem

2006-03-27 Thread Andrus Adamchik
Hi Marie, I noticed a mismatch between your procedure definition and Cayenne mapping: procedure name=GETEXAVALBR returningValue=true returningValue should only be true for Oracle *functions*, not procedures. Try unchecking the corresponding checkbox in the Modeler. Andrus On Mar 27,

Re: ProcedureQuery problem

2006-03-28 Thread Andrus Adamchik
is the problem. Many Thanks Marie From: Andrus Adamchik [EMAIL PROTECTED] Reply-To: cayenne-user@incubator.apache.org To: cayenne-user@incubator.apache.org Subject: Re: ProcedureQuery problem Date: Mon, 27 Mar 2006 21:33:49 +0400 What version of Cayenne and Oracle do you have? It looks like you

Re: Cayenne M12 release is out

2006-03-28 Thread Andrus Adamchik
On Mar 28, 2006, at 3:17 PM, Tomi NA wrote: On 3/23/06, Andrus Adamchik [EMAIL PROTECTED] wrote: As usual long URLs sent from my mail client are split in two lines by Outlook on the receiving end. Here is a shorter URL: http://objectstyle.org/confluence/display/CAY/2006/03/23/ Andrus

Re: Custom select string for Expressions?

2006-03-29 Thread Andrus Adamchik
Hi Tobias, Unfortunately mixing expressions and aggregate syntax is not possible. You'd have to use SQLTemplate. Andrus On Mar 29, 2006, at 11:09 AM, Tobias SCHOESSLER wrote: I like cayenne expressions a lot, instead of writing complex joins in sql these path expressions are very

Re: Strange Exception...

2006-03-30 Thread Andrus Adamchik
Hi Christian, Looks like a hierarchical ClassLoader issue. Try moving Velocity jar from shared location to WEB-INF/lib Andrus On Mar 30, 2006, at 12:48 PM, Christian Mittendorf wrote: Hello! Currently after updating some jars and mysql it looks like Cayenne not longer is working. I get

Re: Custom select string for Expressions?

2006-03-30 Thread Andrus Adamchik
must express that like operation should be done in a case-insensitive manner... Thanks -- Ivan Andrus Adamchik ha scritto: Hi Tobias, Unfortunately mixing expressions and aggregate syntax is not possible. You'd have to use SQLTemplate. Andrus On Mar 29, 2006, at 11:09 AM, Tobias

Re: Error generating pk

2006-04-03 Thread Andrus Adamchik
it start to happen. Is this something that started to happen after switching to a specific version of Cayenne? Andrus On Apr 3, 2006, at 1:04 PM, [EMAIL PROTECTED] wrote: Hi, I use MsSql server. - Orjinal Mesaj - Kimden: Andrus Adamchik [EMAIL PROTECTED] Tarih: Monday, April 3, 2006 11

Re: Cayenne.xml not found.

2006-04-04 Thread Andrus Adamchik
There are probably more elegant solutions, but here is a simple one - package all XML files in appName.jar. Andrus On Apr 4, 2006, at 4:47 PM, WONDER wrote: Well the Structure looks like AppName +META-INF +WEB-INF +

Re: [solved] Re: Cayenne.xml not found.

2006-04-04 Thread Andrus Adamchik
On Apr 4, 2006, at 6:20 PM, Mike Kienenberger wrote: You don't want to use something like this c:/myPath/Cayenne.xml because it won't work when you go to deploy your application on an application server. Yep. That'll be asking for trouble. I've never used J2EE packaging of WO apps, so I am

Re: cayenne get accessors

2006-04-04 Thread Andrus Adamchik
Unlike WO key-value coding, Java standard convention (called JavaBeans) is to use the getXyz for an accessor method of a logical property xyz. All the Expression classes (and endless other Java libraries) follow this convention, so I'd strongly recommend not to modify the getters. You'll

Re: upgrading to 1.2B1

2006-04-07 Thread Andrus Adamchik
On Apr 7, 2006, at 10:41 PM, Bryan Lewis wrote: 1. GenericSelectQuery is deprecated. The javadocs say to replace it with SelectInfo which seems to be a name that no longer exists. It should probably say QueryMetadata. Good catch - just updated the docs. 2. I had a line of code in a copy

Re: upgrading to 1.2B1

2006-04-07 Thread Andrus Adamchik
On Apr 7, 2006, at 11:19 PM, Andrus Adamchik wrote: 2. I had a line of code in a copy of the DataPort example: select.setRoot(entity). The javadocs say that setRoot() is deprecated and to access root via getMetaData(). I don't see how to setRoot () that way. (I saw

Re: Object migrates between DataDomains

2006-04-12 Thread Andrus Adamchik
On Apr 12, 2006, at 12:33 PM, [EMAIL PROTECTED] wrote: For update:??? ClassDescriptor descriptor = localContext.getEntityResolver().getClassDescriptor(obj.getClass ().getSimpleName()); System.err.println(new DeepMergeOperation(ctx).merge(obj, descriptor)); ctx.commitChanges(); Ok, so you

Re: cvs up to date?

2006-04-12 Thread Andrus Adamchik
Unfortunately anonymous CVS service hasn't been restored since the last CVS meltdown @sourceforge. I won't expect it to come back any time soon. So an email option maybe the way to go. Alternatively I can post a snapshot on ObjectStyle.org tomorrow morning. Andrus On Apr 12, 2006, at

Re: Object migrates between DataDomains

2006-04-13 Thread Andrus Adamchik
(Title.java:101) - Orjinal Mesaj - Kimden: Andrus Adamchik Tarih: Wednesday, April 12, 2006 13:23 Konu: Re: Object migrates between DataDomains Kime: cayenne-user@incubator.apache.org On Apr 12, 2006, at 12:33 PM, [EMAIL PROTECTED] wrote: For update:??? ClassDescriptor descriptor

[ANN] Cayenne Beta 2 Released

2006-04-17 Thread Andrus Adamchik
Beta 2 is out: http://objectstyle.org/confluence/display/CAY/2006/04/17/ Lots of bug fixes - upgrade is strongly recommended for the current 1.2 users. Andrus

Re: problem with simple relationship in 1.2B1

2006-04-18 Thread Andrus Adamchik
Bryan, nothing comes to mind right away. Could you possibly create a Jira issue with a DataMap that contains the entities involved - I'll run it in debugger and see what's going on. Andrus On Apr 17, 2006, at 10:04 PM, Bryan Lewis wrote: I'm getting a Commit Exception that I can't

Re: revertChanges method removed?

2006-04-19 Thread Andrus Adamchik
Chris, The method fell victim to the pre-beta refactoring effort - we needed to reconcile new ObjectContext and existing DataContext APIs, so we settled on naming closer to 1.1 ('revertChanges' was introduced during one of the 1.2 milestones). Currently the context has two methods that

Re: revertChanges method removed?

2006-04-19 Thread Andrus Adamchik
rollbackchanges after commitChanges failed, or does it rollback automatically if it fails? regards chris On 4/19/06, Andrus Adamchik [EMAIL PROTECTED] wrote: Chris, The method fell victim to the pre-beta refactoring effort - we needed to reconcile new ObjectContext and existing DataContext APIs, so we

Re: Bug in cayenne 1.2B1 and 1.2B2

2006-04-20 Thread Andrus Adamchik
Hi Ayhan, Could you possibly log this bug to Jira? Someone will take a look. http://objectstyle.org/cayenne/bugs-features.html Thanks, Andrus On Apr 20, 2006, at 4:27 PM, Ayhan Kondoz wrote: Hello, i found following bug in cayenne 1.2B1 and B2. I know that cayenne 1.1 did not have this

Re: Bug in cayenne 1.2B1 and 1.2B2

2006-04-20 Thread Andrus Adamchik
I figured our discussion on Jira [1] may be of general interest, so I am posting the description here. Cayenne 1.2 uses ObjEntity name as a key inside ObjectId, while Cayenne 1.1 used the Java class. So if anyone has a similar mapping, you will need to ensure that the entity names are

Re: Creating Oracle constraints across schemas

2006-04-20 Thread Andrus Adamchik
On Apr 20, 2006, at 7:55 PM, Mike Kienenberger wrote: I notice that the modeler is unable to create a constraint across a schema, even when the two schemas are in the same database. Is this to be expected? Yes. I don't think the RDBMS supports that (as the error below suggests). If

Re: MySql AUTO_PK_SUPPORT

2006-04-22 Thread Andrus Adamchik
On Apr 21, 2006, at 12:33 PM, Borut Bolčina wrote: INFO QueryLogger: DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('source') INFO QueryLogger: INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('source', 200) An implementation of a smarter auto PK configuration mechanism has

Re: MySql AUTO_PK_SUPPORT

2006-04-22 Thread Andrus Adamchik
On Apr 22, 2006, at 11:12 AM, Andrus Adamchik wrote: 4. This line runUpdate(node, pkDeleteString(dbEntities)) should only use a subset obtained in (3) Of course this last point is wrong, but you should get the general idea :-) Andrus On Apr 22, 2006, at 11:12 AM, Andrus Adamchik

Re: PK problem with Postgre

2006-04-22 Thread Andrus Adamchik
Jeff, I am not sure if there was a race condition before, but since ~ M12- B1 PK generator operates under slightly different conditions, being tied to the commit transaction in progress. So have you seen this problem recently? Andrus On Apr 22, 2006, at 9:32 AM, Jeff de Vries wrote: I

Re: PK problem with Postgre

2006-04-22 Thread Andrus Adamchik
: Hi Andrus, The explination from Jeff matches my observations. So answering your question is Yes. I saw that problem with 1.2B2 also. Sako - Original Message - From: Andrus Adamchik [EMAIL PROTECTED] To: cayenne-user@incubator.apache.org Sent: Saturday, April 22, 2006 9:23 AM Subject: Re

Re: MySql AUTO_PK_SUPPORT

2006-04-22 Thread Andrus Adamchik
On Apr 22, 2006, at 3:50 PM, Mike Kienenberger wrote: On 4/22/06, Andrus Adamchik [EMAIL PROTECTED] wrote: An implementation of a smarter auto PK configuration mechanism has been pending for some time, but I think this particular issue can be addresses separately. You can try it on a custom

Re: Null Pointer Exception

2006-04-23 Thread Andrus Adamchik
Joel, Is there anything special about the relationship being set? Looks like there is no property descriptor for it. I just added some diagnostics code that should provide a more informative exception message. This will be a part of 04/23 nightly build. Andrus On Apr 23, 2006, at

Re: MySql AUTO_PK_SUPPORT

2006-04-24 Thread Andrus Adamchik
{ rs.close(); } } finally { con.close(); } return existingTables; } } Regards, Borut On 23.4.2006 11:34, Andrus Adamchik wrote: On Apr 23, 2006, at 1:21 PM, Borut Bolčina wrote: If I understand you correctly, the above algorithm would create a statement

Google Summer of Code

2006-04-26 Thread Andrus Adamchik
Are there any students on this list? Google Summer of Code is coming: http://code.google.com/summerofcode.html http://code.google.com/soc/studentfaq.html Cayenne will be taking part as well. I posted some ideas on Apache wiki: http://wiki.apache.org/general/SummerOfCode2006 But the best thing

Re: toMany relationship not fetched

2006-04-26 Thread Andrus Adamchik
On Apr 26, 2006, at 11:51 AM, Marcin Skladaniec wrote: It looks like the Language object is in HOLLOW state but does not know about it. So we forced the state of Language to HOLLOW and everything works fine. Is there any way for related object to be in a wrong state because of localObject

Re: toMany relationship not fetched

2006-04-26 Thread Andrus Adamchik
On Apr 26, 2006, at 11:53 AM, Andrus Adamchik wrote: On Apr 26, 2006, at 11:51 AM, Marcin Skladaniec wrote: It looks like the Language object is in HOLLOW state but does not know about it. So we forced the state of Language to HOLLOW and everything works fine. Is there any way

Re: caching persistent objects

2006-04-28 Thread Andrus Adamchik
On Apr 26, 2006, at 7:46 PM, Cypher ! wrote: how do I turn the QueryLogger on and off? http://objectstyle.org/confluence/display/CAYDOC/Configuring+Logging The problem I am having is the application is hitting the database for virtually every request and not caching any data at all. [...]

Re: How to enforce Delete before Insert?

2006-04-28 Thread Andrus Adamchik
Ho is the PK defined in ProductRelation? Looks like all three columns are a part of PK. If so why would the error be thrown - the rows you are deleting and inserting are not the same. I wonder if that's a SQLServer thing? Could you post the error. Andrus On Apr 27, 2006, at 9:00 AM, Bill

Re: How to enforce Delete before Insert?

2006-04-28 Thread Andrus Adamchik
On Apr 28, 2006, at 6:38 AM, Juergen Saar wrote: No, that's the dark side of this kind of working. For us this is really no problem, for most installation we use informix without transaction because it is much faster and we would need transactions in about 1% of our software. So we have

Re: java.sql.SQLException: No rows for 'payment_items'

2006-04-28 Thread Andrus Adamchik
On Apr 28, 2006, at 6:44 AM, Philip Copeland wrote: Caused by: java.sql.SQLException: No rows for 'payment_items' As I say the code works fine on my machine and another developers computer - its just failing on our 2 test servers. We are all using MySQL and are using Cayenne 1.2B2 - although

Re: writeProperty() no longer useful for relationships

2006-04-28 Thread Andrus Adamchik
Bryan, Good catch, thanks! 'writeProperty' meaning should be limited to simple properties (and also value holders such as collections or 1.2 org.objectstyle.cayenne.ValueHolder). 'setToOneTarget' should be used for to-one. I will update the docs. Andrus On Apr 27, 2006, at 7:31 PM,

Re: how to catch updates just before commit

2006-04-28 Thread Andrus Adamchik
I suggest overriding the validateFor* methods. This was problematic in the past, but now Cayenne guarantees that validation methods are called only for the objects that will be committed (i.e. those with phantom modifications are not validated). Andrus On Apr 28, 2006, at 12:40 PM, Bryan

Re: how to catch updates just before commit

2006-04-28 Thread Andrus Adamchik
On Apr 28, 2006, at 3:49 PM, Bryan Lewis wrote: Hmm, I must be missing something. I looked at CAY-414 not ready to comment on that now. The validateFor* suggestion is actually not related at all. and looked for related changes in the latest code, but didn't grok it. I tried the

Re: How to enforce Delete before Insert?

2006-04-28 Thread Andrus Adamchik
in object 'dbo.ProductRelation'. -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Friday, 28 April 2006 11:05 PM To: cayenne-user@incubator.apache.org Subject: Re: How to enforce Delete before Insert? Ho is the PK defined in ProductRelation? Looks like all three

Re: how to catch updates just before commit

2006-04-29 Thread Andrus Adamchik
generated, with the validate method called again of course. Andrus Adamchik wrote: On Apr 28, 2006, at 3:49 PM, Bryan Lewis wrote: Hmm, I must be missing something. I looked at CAY-414 not ready to comment on that now. The validateFor* suggestion is actually not related at all. and looked

Re: reverse engineering a postgresql database: no relationships detected?

2006-04-30 Thread Andrus Adamchik
On Apr 30, 2006, at 3:39 PM, Andrus Adamchik wrote: Of the top of my head, I can suggest xstream as an (as far as I've used it) a great serialization engine. Good idea. Serializing preferences to XML may be a better solution. Embedded HSQLDB proved to be too unreliable. And I guess we can

Re: java.sql.SQLException: No rows for 'payment_items'

2006-05-02 Thread Andrus Adamchik
Yeah, this will be a nice improvement. BTW, PK generator 'schema' property is a part of the JPA spec, so we will have to implement it anyways. Andrus On May 2, 2006, at 1:06 PM, Mike Kienenberger wrote: On 4/29/06, Philip Copeland [EMAIL PROTECTED] wrote: Just tracked this down - its

Re: Parameterized Query in DataMap

2006-05-03 Thread Andrus Adamchik
Hi Chandni, to accept parameters, the WHERE part of the query has to look like this: WHERE version_name=$version AND d.parent=$parent And the code where you are setting the parameters - like this (without a '$', just the name): Map params = new HashMap();

Re: CayenneServlet response appears not to be GC'ed

2006-05-04 Thread Andrus Adamchik
I suspect your sessions are not timing out. As SF anonymous CVS seems to be dead for good, I just moved the example code to Apache subversion [1]. There is a sample listener class, cayenne3t.example.util.SessionTracker, that debugs session deallocation. Timeout is controlled in web.xml via

Re: Correctly implementing optimistic concurrency management in Cayenne for web-based computing

2006-05-05 Thread Andrus Adamchik
Cayenne optimistic locking is fail on commit. If I understand correctly what Eric is adding here is the ability to notify the users that some data has just changed even before the commit occurs instead of silently merging the changes. This can probably be useful under some circumstances.

Re: Correctly implementing optimistic concurrency management in Cayenne for web-based computing

2006-05-05 Thread Andrus Adamchik
Eric, I don't have time to go through all your code, but let me comment on possible pitfalls. Sometimes frontend frameworks cause phantom updates, when populating objects from the form values. By phantom I mean the equivalent of this: object.setX(object.getX()). They are cleared on

Re: Correctly implementing optimistic concurrency management in Cayenne for web-based computing

2006-05-05 Thread Andrus Adamchik
in 'modifiedObjects' without our seeing ANY update in 'writeProperty' so how can we srceen for phantoms there. What else can cause objects to show up as dirty when writeProperty is not called for that object? Should I put a breakpoint in the data source delegate or what? Eric --- Andrus Adamchik [EMAIL

CVS migrated to Apache Subversion

2006-05-07 Thread Andrus Adamchik
FYI: we just migrated the repository to Apache. So now non-committers can access the latest code anonymously without delay. New repository information is available here: http://objectstyle.org/confluence/display/CAY/Subversion+Access Andrus

Re: Correctly implementing optimistic concurrency management in Cayenne for web-based computing

2006-05-09 Thread Andrus Adamchik
in the datasource delegate or what will that not show me where I am making things dirty? Why we do NOT see these updates when we override writeProperty... and why we never see the valued MODIFIED when we override setPersistenceState(). Something is not quite right. Hmmm Eric --- Andrus Adamchik

Re: False warning in modeler code-generator

2006-05-09 Thread Andrus Adamchik
On May 9, 2006, at 4:13 PM, Tore Halset wrote: Besides in this Entities tab the headers of the table are unreadable as the row is too narrow. (I'm using Cayenne 1.2B2 (with Windows CayenneModeler)) I think I had the same problem on a mac using the plastic look and feel. See picture

Re: weird stacktrace

2006-05-10 Thread Andrus Adamchik
No idea, but keep in mind that transaction stuff has been significantly reworked since M11, so it may not be relevant anymore. It took a while to figure out the right behavior of the new thread-based transactions, so this may be related to some of the bugs in the early implementation. Andrus I

[ANN] Cayenne B3 released

2006-05-17 Thread Andrus Adamchik
Just posted a new beta release. Check out the new docs format. We may need to improve the directory structure, for now the HTML documentation is under cayenne-1.2B3/doc/Documentation. http://objectstyle.org/confluence/display/CAY/2006/05/17/ Andrus

Re: serialization issue

2006-05-18 Thread Andrus Adamchik
On May 18, 2006, at 6:54 AM, Tomi NA wrote: I have a couple of questions about this. First, is there any special reason the templates, the DataObject and the ObjectId class don't have a serialVersionUID? We should probably add serialVersionUID to all serializable classes (and somehow add

Re: AW: Default domain in cayenne.xml

2006-05-18 Thread Andrus Adamchik
On May 18, 2006, at 1:17 PM, Thilko Richter wrote: But, would you say it make sense to declare a default domain in cayenne.xml, in order to get a domain with getDomain() although you have configured more than one? Unfortunatly I am not so familar with Cayenne concepts ;-) Cayenne domain

Re: Error when join table spans datamaps

2006-05-18 Thread Andrus Adamchik
On May 18, 2006, at 6:28 PM, Mike Kienenberger wrote: But the root problem seems to be that Cayenne should probably not be doing a join this way. There's no guarantee that two DataNodes are running on the same database type, much less in the same database. Maybe it should be changing the

Re: Can I use the CayenneModeler to set up indexes? If so, how?

2006-05-19 Thread Andrus Adamchik
Re indexes: indexes support was requested before and IIRC is the part of JPA spec, so the future versions of the Modeler will support that. Not 1.2 though. Andrus On May 19, 2006, at 10:46 AM, Gentry, Michael ((Contractor)) wrote: The modeler currently doesn't allow you to specify

Re: Inserting with a BLOB column fails

2006-05-19 Thread Andrus Adamchik
A corresponding Cayenne unit test works on all version of MySQL between 4.0 and 5.0 (tested column type as 'longblob', but I don't think it matters). So what version do you have? Another thing to check - are you actually using MySQLAdapter (or 1.2 auto adapter)? Is it possible there is an

Re: Error when join table spans datamaps

2006-05-19 Thread Andrus Adamchik
On May 19, 2006, at 5:57 PM, Mike Kienenberger wrote: On 5/18/06, Andrus Adamchik [EMAIL PROTECTED] wrote: Short of horrible performance, maybe doing joins within Cayenne SQLAction code is not such bad an idea??? Taking a brief look at SQLAction -- Is there a way to register an observer

Re: Inserting with a BLOB column fails [SOLVED]

2006-05-23 Thread Andrus Adamchik
, Andreas On 19 maj 2006, at 18.46, Andrus Adamchik wrote: A corresponding Cayenne unit test works on all version of MySQL between 4.0 and 5.0 (tested column type as 'longblob', but I don't think it matters). So what version do you have? Another thing to check - are you actually using

Re: auto-incrementing non-primary key field value needed

2006-05-23 Thread Andrus Adamchik
On May 22, 2006, at 10:27 PM, Mike Kienenberger wrote: What's the best way to go about generating a non-primary-key auto-incrementing field value (unique, but eventually will be meaningful to the end users)? The database is Oracle (although I'd like it to work on HSQLDB too). Do I have to do

Re: auto-incrementing non-primary key field value needed

2006-05-23 Thread Andrus Adamchik
, Andrus Adamchik wrote: On May 22, 2006, at 10:27 PM, Mike Kienenberger wrote: What's the best way to go about generating a non-primary-key auto-incrementing field value (unique, but eventually will be meaningful to the end users)? The database is Oracle (although I'd like it to work on HSQLDB

Re: class linkage warnings (in a netbeans platform based app)

2006-05-24 Thread Andrus Adamchik
: XMPP messaging sounds good. Is anyone using it ? How does it work, does it send a notifications about any changes in context, or when the context is committed ? Regards Marcin On 25/05/2006, at 5:08 AM, Andrus Adamchik wrote: cayenne.jar bundles essential runtime dependencies. Smack and JMS

Re: Does SQLTemplate support Collection parameters?

2006-06-01 Thread Andrus Adamchik
AFAIK this should work in 1.2, but not 1.1 On Jun 1, 2006, at 2:41 PM, Jeff de Vries wrote: I want the following: ... WHERE type IN ($types) ... to expand into: ... WHERE type IN (1,2,3,4) ... If I pass in a Collection as the value of the parameter types in the parameter map for

Re: Templates

2006-06-11 Thread Andrus Adamchik
Just tried it with the HEAD version of CM - seems to work OK. If you have more info, could you open a Jira issue with screenshots? Andrus Hi I am having trouble using the custome templates in RC1. I set the templates using the Edit Preferences dialog but they aren't being uses in the Class

Re: FaultFailureException

2006-06-13 Thread Andrus Adamchik
Most likely cause is a referential integrity problem - you have an FK with no matching PK. Can happen on databases with no referential constraints support (MySQL MyISAM) or when a DBA didn't bother to define constraints, but there can be other reasons why data can go bad. Likely not

Re: NullPointerException in LRUMap.reuseMapping (was DataRowStore.processUpdatedSnapshots)

2006-06-13 Thread Andrus Adamchik
On Jun 9, 2006, at 3:26 PM, Lothar Krenzien wrote: Hi there , I'm using the recent Cayenne version with Tomcat 5.5 and Java 5. Since a few days I get very often a NullPointerException from cayenne. Analysing the stack trace it seems that the exception is thrown by Apache's commons

Re: loading another datadomain

2006-06-13 Thread Andrus Adamchik
Yeah, you would want to have both maps in a single DD (otherwise you'll have to maintain two DataContexts for the same user). If cdeploy Ant task is too cumbersome to use (i.e. you want runtime detection), you can load a second map via the API. The easiest way to do this is using the trick

Re: raw dataport

2006-06-14 Thread Andrus Adamchik
Joe, Care to elaborate how this will work with a source database that is not MySQL? Andrus On Jun 14, 2006, at 4:07 PM, McDaniel, Joe R. wrote: For many databases, a LOAD is far faster than INSERT. For MySQL, for instance, one can do a LOAD REMOTE where the file being loaded is remote

Re: IllegalStateException in DataRowStore (thrown by LRUMap)

2006-06-14 Thread Andrus Adamchik
While I don't have the answers, it would be helpful if you could provide more details: 1. What version of commons-collections do you have (I checked 3.1 and the line numbers do not match with the stack below) 2. Does it happen as a result of a certain sequence of events, or does it happen

Re: Problem traversing relationships - need hint

2006-06-19 Thread Andrus Adamchik
On Jun 19, 2006, at 5:13 PM, Arturo Perez wrote: Iterator i = articleCategory.getArticles().iterator(); while (i.hasNext()) { ArticleCategoryLink acl = (ArticleCategoryLink)i.next(); ArticleMeta am = acl.getLatestArticle(); Article a = am.getArticle(); } The article is null

Re: modifying relationship list

2006-06-20 Thread Andrus Adamchik
Someone should write a paper. Yep :-) I recall back in my WebObjects/EOF days, instead of using property setters I always used a generic method with monstrous name of the Objective C heritage - addObjectToBothSidesOfRelationshipWithKey and its counterpart

Re: Problem traversing relationships - need hint

2006-06-20 Thread Andrus Adamchik
entities in question. Andrus On Jun 19, 2006, at 8:32 PM, Arturo Perez wrote: Andrus Adamchik andrus at objectstyle.org writes: On Jun 19, 2006, at 5:13 PM, Arturo Perez wrote: Iterator i = articleCategory.getArticles().iterator(); while (i.hasNext()) { ArticleCategoryLink acl

Re: modifying relationship list

2006-06-20 Thread Andrus Adamchik
Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 2:19 AM To: cayenne-user@incubator.apache.org Subject: Re: modifying relationship list Someone should write a paper. Yep :-) I recall back in my WebObjects/EOF days, instead of using property setters I

Re: FaultFailureException

2006-06-22 Thread Andrus Adamchik
Yeah, I have your DataMap file. I'll investigate what's going on. Andrus On Jun 22, 2006, at 6:47 PM, Lothar Krenzien wrote: Hi, I have a web app with struts and get very often a FaultFailureException in cayenne (RC1). Either with the text state=hollow or state=transient. It happens

Re: FaultFailureException

2006-06-22 Thread Andrus Adamchik
exceptions as well? Andrus On Jun 22, 2006, at 7:12 PM, Andrus Adamchik wrote: The error happens mostly when cayenne tries to resolve the relation tblPerson - tblPartner. It's an 1:1 relation but the relation can be null. DataContext context = getDaoContext(ctx); TblAccount account

Re: FaultFailureException

2006-06-23 Thread Andrus Adamchik
if this is related to the earlier exceptions as well? On Jun 22, 2006, at 7:12 PM, Andrus Adamchik wrote: The error happens mostly when cayenne tries to resolve the relation tblPerson - tblPartner. It's an 1:1 relation but the relation can be null. DataContext context = getDaoContext(ctx); TblAccount

Re: Cayenne RC2 released

2006-06-23 Thread Andrus Adamchik
am stuck with b3. thanks chris On 6/23/06, Andrus Adamchik [EMAIL PROTECTED] wrote: http://objectstyle.org/confluence/display/CAY/2006/06/23/ Just posted an RC2 with a list of last minute bug fixes. Please comment on the new Quick Start tutorial included in the docs (if you think it sucks

Re: Cayenne RC2 released

2006-06-23 Thread Andrus Adamchik
, various integration scenarios (Tapestry, Spring). Of course a book would be the ultimate solution to many newcomers and would greatly improve Cayenne's user base. It's just a wishful thought. Great work, Borut On 23.6.2006 12:42, Andrus Adamchik wrote: http://objectstyle.org/confluence/display

Re: Deleting old data

2006-06-28 Thread Andrus Adamchik
The way you described it is the right way: context.deleteObject(..); context.commitChanges(). So I guess you'll need to check the code to see why nothing gets deleted. Maybe nothing gets selected in the first place? Does select query prints a result count that is greater than zero?

Re: writeNestedProperty

2006-06-29 Thread Andrus Adamchik
Hi Andrew, No, unfortunately there's none. Should be easy to add via a custom wedge class sitting between CayenneDataObject and your own class (configurable in the Modeler) Andrus On Jun 29, 2006, at 1:58 PM, [EMAIL PROTECTED] wrote: Hello; Can I ask if there's something like

Re: writeNestedProperty

2006-06-30 Thread Andrus Adamchik
Cayenne 3.0 will likely be supporting both kinds of persistent objects throughout the stack - those that implement DataObject (i.e. provide generic access to properties) and POJO's (or at least objects implementing Persistent interface) that doesn't have [read|write] (Nested)?Property. So

Re: how to unsubscribe

2006-06-30 Thread Andrus Adamchik
Sure. Send an email to [EMAIL PROTECTED] using From address that you used to subscribe. And then reply to the confirmation email. http://objectstyle.org/cayenne/lists.html Let me know if you are still having problems. Andrus On Jun 30, 2006, at 12:57 PM, Cypher ! wrote: Does anyone

Re: remote object persistence - client classes

2006-07-05 Thread Andrus Adamchik
Actually clients written in other languages is one area that has a huge potential. And this is something I'd really like to explore. Current transport layer (Hessian) has support in many other languages, also a standard WS interface is being developed as a Summer of Code project. All this

Re: remote object persistence - client classes

2006-07-05 Thread Andrus Adamchik
. And a learning curve... Andrus On Jul 5, 2006, at 2:15 PM, Tomi NA wrote: On 7/5/06, Andrus Adamchik [EMAIL PROTECTED] wrote: Actually clients written in other languages is one area that has a huge potential. And this is something I'd really like to explore. Current transport layer (Hessian) has

Re: Can't build a query for temporary id after upgrade from 1.2B2 to 1.2RC2

2006-07-05 Thread Andrus Adamchik
Looks like you have a HOLLOW object with a temporary ID? Strange... Andrus On Jul 5, 2006, at 3:20 PM, Mike Kienenberger wrote: I'm not entirely certain what's changed between 1.2B2 and 1.2RC2, but I'm now getting this error when I upgrade. This is reading a property a newly-created data

Re: remote object persistence - client classes

2006-07-07 Thread Andrus Adamchik
/06, Andrus Adamchik [EMAIL PROTECTED] wrote: The interesting part is processMessage(ClientMessage) - essentially all communications (including queries and updates) are done using a set of ClientMessages. The simplest message would be a QueryMessage that holds a NamedQuery. This is probably

Re: Different DataContext Exception

2006-07-10 Thread Andrus Adamchik
Well, the error still happens because the DataContexts are different at the time when you set the relationship. The question is why. I think when this query runs secondly after the first run, first query result refrences corrupted by second query results. I don't preclude a possibility of

Re: How to share no committed objects between sessions

2006-07-12 Thread Andrus Adamchik
On Jul 10, 2006, at 12:41 PM, Oscar Maire-Richard wrote: Hi, I would like to know your suggestions for what I think is a common problem: For each request my application obtains an identifier (that is not the PK but must be unique), if a DataObject with this identifier exists, uses it,

Re: UUID as primary key

2006-07-12 Thread Andrus Adamchik
Yes, there are a few ways of doing this. The cleanest one is this: object.getObjectId().getReplacementIdMap().put(Treatment.BLA_BLA_PK, UUID.randomUUID()); BTW, this code can be added to setPersistenceState() to be executed when persistence state is changed to NEW. Andrus On Jul 10,

Re: Duplicate Key Problem

2006-07-12 Thread Andrus Adamchik
Hmm.. MySQLPkGenerator runs UNLOCK in the finally block. Of course if the connection goes down or something else equally bad happens during unlock, then you can end up locking the table. I'll be curious to know what exactly happened, as we may improve the unlock reliability as a result.

Re: Generate sources with Maven

2006-07-13 Thread Andrus Adamchik
Looks like Cayenne interpreted C: path as a URL. Haven't looked at the code, don't know why. Andrus On Jul 13, 2006, at 8:16 AM, Kevin Menard wrote: So, I've been following the directions from http://objectstyle.org/confluence/display/CAY/Cayenne+Maven but have been unable to get things

Re: UUID as primary key

2006-07-13 Thread Andrus Adamchik
On Jul 13, 2006, at 12:32 PM, Øyvind Harboe wrote: On 7/12/06, Gentry, Michael (Contractor) [EMAIL PROTECTED] wrote: You could override setPersistenceState() in your Treatment class: public void setPersistenceState(int state) { super.setPersistenceState(state); // If object was just

Re: Duplicate Key Problem

2006-07-13 Thread Andrus Adamchik
that kind of load? /dev/mrg -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 2:36 PM To: cayenne-user@incubator.apache.org Subject: Re: Duplicate Key Problem BTW, I tried to reproduce PK generator getting an incorrect PK range on MySQL

[ANN] 1.2 Final Release is Available

2006-07-16 Thread Andrus Adamchik
It is here! Enjoy :-) http://objectstyle.org/confluence/display/CAY/2006/07/16/ Andrus

Re: DataContext.localObject() on uncommitted objects

2006-07-19 Thread Andrus Adamchik
I can confirm - it's a bug. I just fixed it on 1.2 branch; will commit the fix to HEAD shortly. http://issues.apache.org/cayenne/browse/CAY-601 Andrus On Jul 19, 2006, at 11:55 AM, Øyvind Harboe wrote: Is it supported to pass an ObjectId for an uncommitted CayenneDataObject (i.e. where

Re: no metadata set when using query chain with sql templates

2006-07-19 Thread Andrus Adamchik
Hi Hannes, Yeah, QueryChain can't handle object conversion, as Cayenne stack only supports a single metadata object per query. I guess it can at least use the entity of the first query in a chain, still making it kind of kludgy. At the very minimum it should return true for

Re: no metadata set when using query chain with sql templates

2006-07-19 Thread Andrus Adamchik
On Jul 19, 2006, at 8:55 PM, Hannes Janetzek wrote: Ok, thanks. What I wanted was to search over different fields and to get one list of bibtex entrys. Now I found a solution by just putting everything in one sql statement. Cool. Yeah, something like SQL union should work here. Andrus

Re: UUID as primary key

2006-07-21 Thread Andrus Adamchik
context requires an extra check. E.g.: public void setPersistenceState(int state) { super.setPersistenceState(state); if (state == PersistenceState.NEW getObjectId() == null) { setId(UUID.randomUUID()); } } Andrus On Jul 21, 2006, at 5:35 PM, Øyvind Harboe wrote: On 7/13/06, Andrus

Re: PK Column - Cayenne Modeler

2006-07-22 Thread Andrus Adamchik
BTW, I suggest an upgrade to Cayenne 1.2 final - it has some Modeler glitches fixed. Andrus On Jul 22, 2006, at 11:46 AM, Rashid Khan wrote: Thanks for the explanation, Michael. On 7/22/06, Michael Gentry [EMAIL PROTECTED] wrote: For Report, you want report_id set as PK (I think this

  1   2   3   >