Re: Setting the Transaction Isolation Level

2014-03-11 Thread Laurent Marchal
Hi Jurgen, In Cayenne 3.0 I achieved this by extending PoolManager with my own class and override the newPooledConnection() method. I don't know about Cayenne 3.1 Class MyPoolManager : @Override protected PooledConnection newPooledConnection(String userName, String password) thro

Re: Cayenne commit never modified columns

2011-10-07 Thread Laurent Marchal
re of synchronization yourself ! Regards, Laurent. Le 09/27/2011 10:25 AM, Laurent Marchal a écrit : Hi guys, I've been successfully used Cayenne for years now, but we have a really weird issue right now : Cayenne is committing columns that are never modified in our code.. I'm pretty

Cayenne commit never modified columns

2011-09-27 Thread Laurent Marchal
Hi guys, I've been successfully used Cayenne for years now, but we have a really weird issue right now : Cayenne is committing columns that are never modified in our code.. I'm pretty sure Cayenne is not the problem, but more the way we use it and I'd like your help on Cayenne internals t

Re: SQLTemplate Velocity lexical error

2011-05-25 Thread Laurent Marchal
it : Not commenting on the overall solution (EJBQL shortcomings are probably a topic of a seaparate thread), but Expressions can store parameters, just like queries: Expression e = ... Expression eWithParameters = e.expWithParameters(parametersMap); Andrus On May 17, 2011, at 12:13 PM, Laurent Mar

Re: SQLTemplate Velocity lexical error

2011-05-17 Thread Laurent Marchal
2011 10:15 AM, Robert Zeigler a écrit : ... I'm still not 100% clear why this precludes using SQLTemplate parameters? If you're generating the SQL, you can also generate the parameter in the SQL... right? Robert On May 17, 2011, at 5/179:52 AM , Laurent Marchal wrote: I can't us

Re: SQLTemplate Velocity lexical error

2011-05-17 Thread Laurent Marchal
3:52 PM, Robert Zeigler a écrit : Why can't you use sql parameters? WHERE SDEPTHR.JOBNAME #bindEqual($val); and then when you execute the query, update the parameter map with key:"val" and value: "Test_*@#*"? Robert On May 16, 2011, at 5/163:35 PM , Laurent March

Re: SQLTemplate Velocity lexical error

2011-05-17 Thread Laurent Marchal
this works in an SQL template. Often, though, Velocity is smart enough to use the character as is if it's not escaped at all. So 'Test_*@#' would probably work fine without escaping. On Mon, May 16, 2011 at 4:35 PM, Laurent Marchal wrote: Hi, I am using a simple SQLTemplate

SQLTemplate Velocity lexical error

2011-05-16 Thread Laurent Marchal
Hi, I am using a simple SQLTemplate select query but it fails because of special charachters : SELECT * FROM SDEPTHR INNER JOIN THRESH ON SDEPTHR.DEPTHRID=THRESH.THRESHID WHERE SDEPTHR.JOBNAME = 'Test_*@\#*' Error returned : [v.3.0.1 Aug 25 2010 19:58:47] Error parsing template 'SELEC

Re: Deadlock in PoolManager

2010-11-23 Thread Laurent Marchal
dispose that often. Please open a Jira. Thanks, Andrus On Nov 23, 2010, at 5:54 PM, Laurent Marchal wrote: Hi all, I'm using cayenne 3.0 ans I'm experiencing a deadlock when I exit my application. I call PoolManager.dispose() to disconnect all connections, but it seem

Deadlock in PoolManager

2010-11-23 Thread Laurent Marchal
ted by the java console. Thanks, Laurent Marchal. Name: Worker-2 State: BLOCKED on com.sma.core.net.opconpoolmana...@197871d owned by: main Total blocked: 327 Total waited: 475 Stack trace: org.apache.cayenne.conn.PoolManager.connectionClosed(PoolManage

Re: Velocity parsing error with "##"

2010-08-13 Thread Laurent Marchal
JOB_PARAM it will be handled via JDBC as String (not by Velocity), so it will be prepared statement. Also it will protect your application from any SQL-Injection in this param and it's usually faster to user prepared statements (depends from DBMS type). Evgeny. 2010/8/13 Laurent Marchal: H

Velocity parsing error with "##"

2010-08-13 Thread Laurent Marchal
Hi all, After months of using Cayenne 3.0 (which is awesome BTW) I just discovered that when I put two "##" in some of my object names in database and then I use some SQLTemplate I have a Velocity error. It seems that Velocity does not like ## because it's detected as a bad directive. I

Re: Cayenne 3.0 is released

2010-05-06 Thread Laurent Marchal
Just a word : Awesome ! Great job guys, and thank you. Laurent Marchal Le 05/06/2010 10:31 AM, Aristedes Maniatis a écrit : The Cayenne team are thrilled to announce the availability of Cayenne 3.0. Over the last few years a vast number of improvements have gone into Cayenne 3, and this

Re: Getting 'PRINT' output from Stored Procedures

2010-02-04 Thread Laurent Marchal
efore exec and do select after in case you are using simple RowQuery. But it will work only for first SELECT. If you put multiple selects in Stored Procedure, Cayenne took first one and drop others Evgeny. 2010/2/4 Laurent Marchal: Unfortunately I did not find any ways to get PRINTed outpu

Re: Getting 'PRINT' output from Stored Procedures

2010-02-04 Thread Laurent Marchal
(does it actually print something to the console, or does it return a value to the user?). Maybe something to ask on a SQLServer forum, formulating it as a JDBC question (how do I get a value of PRINT function via JDBC)... Andrus On Jan 30, 2010, at 12:55 AM, Laurent Marchal wrote: Hi all

Re: Getting 'PRINT' output from Stored Procedures

2010-02-01 Thread Laurent Marchal
nction via JDBC)... Andrus On Jan 30, 2010, at 12:55 AM, Laurent Marchal wrote: Hi all, I'm trying to get the results of the printed text displayed by a stored procedure in SQL Server using the "PRINT" function. The stored procedure do not have any OUT parameters... If I u

Getting 'PRINT' output from Stored Procedures

2010-01-29 Thread Laurent Marchal
uery("StoreProc"); QueryResponse result = context.performGenericQuery(query); the QueryResponse is empty. Is there a way to get the output with Cayenne (3.0) ? Thanks. Laurent Marchal.

Re: Cayenne 3.0 RC1 released

2010-01-06 Thread Laurent Marchal
Let me know if I can help you on this one. Thanks for your hard work. Le 06/01/2010 03:27, Aristedes Maniatis a écrit : On 6/01/10 8:01 PM, Laurent Marchal wrote: Congratulations for this release candidate ! I had an issue quite some time ago now which does not seem to appear in the

Re: Cayenne 3.0 RC1 released

2010-01-06 Thread Laurent Marchal
Hello, Congratulations for this release candidate ! I had an issue quite some time ago now which does not seem to appear in the known issue list for the 3.0 release : https://issues.apache.org/cayenne/browse/CAY-1112 Maybe I reported it wrong in JIRA ? Thanks. Laurent Marchal. Le 06

Re: New Committer: Olga

2009-11-20 Thread Laurent Marchal
Very good news ! Welcome Olga. Aristedes Maniatis a écrit : The Cayenne team would like to congratulate Olga (Ольга Ткачева) on her appointment as a committer. As recognition for her ongoing contributions over the last year, this status allows Olga to make changes to the source control reposit

Re: Auditing SQL queries

2009-02-11 Thread Laurent Marchal
Ok thanks for the tips ! Andrus Adamchik wrote: On Feb 11, 2009, at 1:19 AM, Laurent Marchal wrote: Yeah i agree that table/field/date/old value/new value is clearer, but it seems complex to me to have old/new values. Currently this can be done by listening to

Re: Auditing SQL queries

2009-02-10 Thread Laurent Marchal
h, we occasionally need to go through our audit logs to research why something changed, and if we had to work with raw sql, it'd be pretty hopeless. Breaking things out into table/field/date/old value/new value/source-of-change-identity makes things a lot better. On Tue, Feb 10, 2009 at 6:05 P

Auditing SQL queries

2009-02-10 Thread Laurent Marchal
Hello there, In our product we need to audit all the database modifications (creates, updates, deletes) and log them in an audit table. I see some olds posts in the ML about that and there are solutions for that in cayenne. But i would like to know if somebody have some hints about the bes

Re: Cayenne 3.0M5 released today

2008-12-15 Thread Laurent Marchal
Nice news, I will try that soon ! Aristedes Maniatis wrote: Milestone 5 marks another set of major achievements for the Cayenne ORM library. A successful GSoC project resulted in lots of very useful improvements to the Cayenne Modeler. It is looking better than ever, with time saving features

Re: Using Cayenne with RCP and Birt?

2008-11-26 Thread Laurent Marchal
e a long way in understanding what to do--thanks for the link! Lawrence On Nov 25, 2008, at 2:03 AM, Laurent Marchal wrote: Hello, I am sucessfully using cayenne in a big eclipse RCP application (25 plugins), we use BIRT chart library to programmatically create dynamic charts, and we are a

Re: Using Cayenne with RCP and Birt?

2008-11-25 Thread Laurent Marchal
0.Alpha1.html https://jira.jboss.org/jira/browse/JBIDE-2220 Cheers. Laurent Marchal Andrus Adamchik wrote: Hi Lawrence, Don't recall BIRT being mentioned on this list. You could be the first one to try it (?) Andrus On Nov 25, 2008, at 3:02 AM, Lawrence Gerstley wrote: Hello, I've

Re: Date of next release?

2008-11-20 Thread Laurent Marchal
OK no problems, thanks Andrus ! Andrus Adamchik wrote: Hi Laurent, CAY-1112 and a few other recent issues are on my radar. Sorry couldn't get to it yet. So this probably won't get resolved for M5, however this doesn't mean the issue is ignored. Andrus On Nov 19, 2008, at 7

Re: Date of next release?

2008-11-19 Thread Laurent Marchal
Hi Borut, Andrus Nice website ! glad to see cayenne in this project. I just want to place my Jira CAY-1112 before tagging M5 ;) I think it's a 'critical' bug, because i get TRANSIENT objects from relationships laurent. Andrus Adamchik wrote: Hi Borut, Nice site :-) M5 is coming ou

Re: commit() when autocommit is enabled

2008-10-08 Thread Laurent Marchal
I had a similar error, i was never able to reproduce. An exception saying a commit was attempted while autocommit is on. Occured only 1 time with my application and SQL Server. Scott Anderson wrote: I'm working on a path to add generated PK support to SQLite, but I've come across an issue with c

Re: 3.0M4 : Fetching from relationship returns TRANSIENT objects.

2008-09-29 Thread Laurent Marchal
Filed a bug https://issues.apache.org/cayenne/browse/CAY-1112 Cheers. Laurent. Andrus Adamchik wrote: Hi Laurent, sorry didn't have time to look at this yet. Yes, please open a Jira with these details. We'll try to get to it. Thanks, Andrus On Sep 24, 2008, at 12:00 PM, Laure

Re: 3.0M4 : Fetching from relationship returns TRANSIENT objects.

2008-09-24 Thread Laurent Marchal
Hello Andrus, Have you some time to look at this problem, i think it's a bug. I can file a bug if you want. Thanks. Laurent. Laurent Marchal wrote: Hi Andrus, I post on the mailing list with a new mail adress, because my provider sucks I will try to detail more what i do, s

Re: 3.0M4 : Fetching from relationship returns TRANSIENT objects.

2008-09-19 Thread Laurent Marchal
text().deleteObject(toDelete); 3) Rollback 4) re-Fetch MasterJobAux using the relationships MasterJob.getRelatedMasterJobAux(); I get TRANSIENT objects, you can look a the SQL log attached where there is some others details. Thanks. Laurent marchal. Hi, Sorry, you posted this earl

3.0M4 : Fetching from relationship returns TRANSIENT objects.

2008-09-11 Thread Laurent Marchal
existing ARTISTS_AUX, i get also the ARTISTS_AUX created before the rollback() with the TRANSIENT state and no ObjectContext associated. So my question is : is this normal to get TRANSIENT objects from a relationship after a rollback ? Thanks Laurent Marchal.

Returning updated rows from SQLTemplate

2008-09-11 Thread Laurent Marchal
aRows(true); List dtList = context.performQuery(query); the returned list is always empty How can i get the precious Integer saying "X rows updated" ? Thanks. Laurent Marchal.

Re: Queries order on commit.

2008-07-21 Thread Laurent Marchal
y the existing MasterScheduleAux objects". Monday morning, tough time :-) Andrus On Jul 21, 2008, at 10:26 AM, Andrus Adamchik wrote: On Jul 18, 2008, at 7:03 PM, Laurent Marchal wrote: I managed to modify directly the object, removing the relation from MasterSchedule->MasterSche

Re: Queries order on commit.

2008-07-18 Thread Laurent Marchal
: 1->SAFC:112, 2->SASEQNO:0, 3->SKDID:505] === updated 4 rows. snapshot version changed, don't know what to do... Old: [EMAIL PROTECTED], SAVALUE=1, SAFC=112, SKDID=505}, version=-9223372036854774826, replaces=-9223372036854775808], New: [EMAIL PROTECTED], SAVALUE=1, SAFC=112, SKDID=505}, version=-9223372036854774632, replaces=-9223372036854775808] postSnapshotsChangeEvent: [Snaps

Re: Queries order on commit.

2008-07-18 Thread Laurent Marchal
Ok i will try to modify the object directly, and see the results. I will post code if this doesn't work. Andrus Adamchik wrote: On Jul 18, 2008, at 5:10 PM, Laurent Marchal wrote: Hi ! I would like to do some DELETEs and INSERTs in one transaction, but since DELETE is made afte

Queries order on commit.

2008-07-18 Thread Laurent Marchal
rsion changed, don't know what to do" messages ? Thanks. Laurent Marchal. # # LOG # --- will run 2 queries. --- transaction started. INSERT INTO dbo.SNAME_AUX (SAFC, SASEQNO, SAVALUE, SKDID) VALUES (?, ?, ?, ?) [batch bind: 1->SAFC:112, 2->SASEQNO:2, 3->SAVALUE:'1',

Re: Unique persistent object and caching issue

2008-07-15 Thread Laurent Marchal
nd see if that makes a difference. Andrus On Jul 15, 2008, at 6:43 PM, Laurent Marchal wrote: target="SNAME_AUX" toMany="true">

Re: Unique persistent object and caching issue

2008-07-15 Thread Laurent Marchal
Sorry forgot to say I use 3.0M4 !

Re: Unique persistent object and caching issue

2008-07-15 Thread Laurent Marchal
D) WHERE t1.SKDID = ? AND t1.SASEQNO = ? AND t1.SAFC = ? [bind: 1->SKDID:29, 2->SASEQNO:1, 3->SAFC:112] === returned 1 row. - took 27 ms. +++ transaction committed. --- will run 1 query. --- transaction started. SELECT DISTINCT t0.SKDID, t0.SKDSAM, t0.SKDNAME, t0.SKDSTART, t0.SKDWKDAYS

Re: Unique persistent object and caching issue

2008-07-15 Thread Laurent Marchal
oid I attached the logs, where Artist is dbo.SNAME and Artist_AUX is dbo.SNAME_AUX. Is there a way to fix that ? Andrus Adamchik wrote: 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 relati

Re: Unique persistent object and caching issue

2008-07-15 Thread Laurent Marchal
nship between Artist and Artist_AUX and let Cayenne handle faulting automatically behind the scenes. Andrus On Jul 15, 2008, at 3:25 PM, Laurent Marchal wrote: Hi all, I have a problem that i cannot solve. My customer has a strange database schema : each table has a related "AUX" t

Unique persistent object and caching issue

2008-07-15 Thread Laurent Marchal
ect is not re-created for each query, so the internal "list _auxList" is not reseted to null, and the extended properties are not refreshed. How can i force this list to be refreshed when a fresh Artist object is fetched ? Or is there another way to do that ? Thanks. Laurent Marchal.

Re: Bug in Expression.toEJBQL with inExpr

2008-06-10 Thread Laurent Marchal
Thanks for the fix ! Regards. Andrus Adamchik wrote: 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

Bug in Expression.toEJBQL with inExpr

2008-06-10 Thread Laurent Marchal
in (1, 2)" Then i transform it to EJBQL with Expression.toEJBQL("a") ---> "a.departmentId not in ()" the IN clause is empty. Thanks. Laurent Marchal.

Re: NamedQuery / SQLTemplate keyPath validation

2008-06-10 Thread Laurent Marchal
hat it's not very clean, but we had hard deadlines in our project, and we needed something which work quickly. We use this system everywhere in our Descriptors Factories, i can post some code if needed. Regards. Laurent Marchal. Lachlan Deck wrote: Hi there, (question related to ROP)

Re: Relationship caching

2008-04-15 Thread Laurent Marchal
caching, how can i disable all caches ? - Is there a way to NOT cache relationships by default and re-ask relationships each time ? thanks. Laurent Marchal _ Ce message a été vérifié par l'antivirus de

Relationship caching

2008-04-15 Thread Laurent Marchal
re-ask relationships each time ? thanks. Laurent Marchal

Re: How to propoerly close context db connection

2008-03-31 Thread Laurent Marchal
personnaly i used informations from here http://cwiki.apache.org/CAY/setting-database-connection.html I inherit the cayenne PoolManager (code is attached) and when a disconnect occurs i use a thread to poll when the connection becomes active with try { _log.trace("[DatabaseCon

Re: Thread-safe Write DataContext

2008-03-26 Thread Laurent Marchal
Kienenberger wrote: Why not create a new DataContext when you need to do write operations? On 3/25/08, Laurent Marchal <[EMAIL PROTECTED]> wrote: Hi all ! I spent some time searching documentation about the thread-safety status of DataContext, i found some answers on this mailing list but i

Thread-safe Write DataContext

2008-03-25 Thread Laurent Marchal
lock.lock(); } public void preRemove(Object entity) { lock.lock(); } public void preUpdate(Object entity) { lock.lock(); } }); Do you think it can be a good solution ? Thanks. Laurent Marchal.