Re: Deadlock with Derby and CreateIfNoSchemaStrategy

2011-12-20 Thread Arnaud Garcia
Hi Mathias, It works for me with embedded derby, I don't remember why but I have created my own CreateIfNoSchemaStrategy... well here the code, hope it helps and if it works for you take it as my christmas gift ;-) Arnaud try { DataSource dataSource = new PoolManager("org

No object is registered in context with Id ?

2011-12-20 Thread Arnaud Garcia
Hi all, I have this error that I don't understand ? (see below), what does it means ? remark: My SXDBPatient Cayenne object has a pk attribute (key) and also an attribute wich is id thanks for help, Arnaud org.apache.cayenne.CayenneRuntimeException: [v.3.0.2 Jun 11 2011 09:31:18] No object is r

Re: Cayenne 'the book', Was: Cayenne 3.0 is released

2010-05-08 Thread Arnaud Garcia
Hello, Thanks Ari, Ready to help ! Writing a book for Cayenne is very important for the project now... (for marketing...) But beyond marketing lot of developpers (as me) know just 20% of what we can do with Cayenne... and it is a bit frustrating.. Another point, is the integration with other f

Re: Cayenne 3.0 is released

2010-05-07 Thread Arnaud Garcia
roject. > > mrg > > > On Fri, May 7, 2010 at 3:50 AM, Arnaud Garcia > wrote: > > Many thanks for this great ORM, > > > > Maybe a book now ? like cayenne in action ?? > > As a newbie in cayenne, for me it is also very important to have a good >

Re: Cayenne 3.0 is released

2010-05-07 Thread Arnaud Garcia
Many thanks for this great ORM, Maybe a book now ? like cayenne in action ?? As a newbie in cayenne, for me it is also very important to have a good book, for best practices etc... I am not good enough to start writing such a book, but definitively Cayenne needs one now Thanks again for this

Re: different ObjectContext...

2010-04-28 Thread Arnaud Garcia
still looking for a better solution because if you perform > > DataContext.newObject(...) -- the object, when serialized without > > DataContext.commitChanges() -- does not hold a permanentId (temporary > object > > ID is not much help). And you can't ask Cayenne to r

Re: Wicket Cayenne

2010-04-24 Thread Arnaud Garcia
btaining-datacontext.html something's > wrong, all the code snippets are gone! > [2] > > http://74.125.153.132/search?q=cache:HFEZ2Rs496UJ:cayenne.apache.org/doc20/obtaining-datacontext.html+http://cayenne.apache.org/doc30/obtaining-datacontext.html&cd=1&hl=en&ct=clnk&

Re: Wicket Cayenne

2010-04-24 Thread Arnaud Garcia
e serialization issue, if session objects are > serialized. But you avoid creating DataContext at every page. > > Not sure if this helps you. > > You may want to see how DataBinder[1] has implemented it. > > [1] http://databinder.net/wicket/show/overview/ > > - Nishant

Re: different ObjectContext...

2010-04-24 Thread Arnaud Garcia
gt; ID is not much help). And you can't ask Cayenne to resurrect this from > Cache > based on temporaryId. > > > Hopefully this helps. Suggestions welcome. > > - Nishant > > On Fri, Apr 23, 2010 at 12:43 AM, Arnaud Garcia >wrote

Wicket Cayenne

2010-04-24 Thread Arnaud Garcia
Hello, I put my question in both forum, (wicket and this one) Does anyone knows how to set up Cayenne for wicket ? In my WicketPage I have : private DataContext ctxt = (DataContext) DataContext.getThreadObjectContext(); but, I don't think it is the good way, since I suppose wicket will seriali

different ObjectContext...

2010-04-22 Thread Arnaud Garcia
Hello, (lot of questions today ;-) I have a curious error on my site (wicket+cayenne). Cannot set object as destination of relationship toAdresse because it is in a different ObjectContext at org.apache.cayenne.CayenneDataObject.willConnect(CayenneDataObject.java:344) at org.apache.cayenn

Re: cayenne wicket unit test => Current thread has no bound ObjectContext

2010-04-22 Thread Arnaud Garcia
Cayenne web filter? In > > my application (which is Tapestry, but should apply to Wicket, I > > think) I have: > > > > > >Cayenne Filter > > > > org.apache.cayenne.conf.WebApplicationContextFilter > > > > > >

cayenne wicket unit test => Current thread has no bound ObjectContext

2010-04-22 Thread Arnaud Garcia
Hello, I am working on a Wicket Cayenne application and when I launch the tests I have an error when the DataContext is initialized: This line, DataContext ctxt = (DataContext) DataContext.getThreadObjectContext(); throws an java.lang.IllegalStateException: Current thread has no bound ObjectCon

Re: count(*) with parameter

2010-04-21 Thread Arnaud Garcia
ormance or simply whether your design > concepts are better handled fromm the DBMS or OO perspective. > > Joe > > On Apr 19, 2010, at 12:28 PM, Arnaud Garcia wrote: > > > Hi and thanks, > > > > Well both, modeler and code (just for my cayenne understanding...) > &g

Re: count(*) with parameter

2010-04-19 Thread Arnaud Garcia
other ways to do this depending on your > design. The ExpresionFactory has a lot of powerful methods to help you out. > > Joe > > > > > On Apr 18, 2010, at 12:15 PM, Arnaud Garcia wrote: > > > Hello, > > > > I am not sure how to create a select count(*

count(*) with parameter

2010-04-18 Thread Arnaud Garcia
Hello, I am not sure how to create a select count(*) in the modeler when I need to pass a parameter ? I downloaded the petstore example, and it seems that I have to create a "Raw SQL" Query, and directly write my select count(*)... =>but how to I had my parameter in my SQL ? ... then I suppose I

Re: default value from the modeler ?

2010-04-14 Thread Arnaud Garcia
o, there is > currently not a way in the modeler to set those initial values. > > mrg > > > On Wed, Apr 14, 2010 at 8:28 AM, Arnaud Garcia > wrote: > > Hello, > > > > Is it possible to add default values using the modeler ? > > > > if not, the g

default value from the modeler ?

2010-04-14 Thread Arnaud Garcia
Hello, Is it possible to add default values using the modeler ? if not, the good way is to overide the setPersistenteState ? thanks, arnaud public class SomeObjEntity extends _SomeObjEntity { public void setPersistenceState(int state) { super.setPersistenceState(state); // if the

Re: getThreadObjectContext with domain parameter - code -

2009-09-15 Thread Arnaud Garcia
gt;        objectContextMap.put(domain, context); > > Or maybe there is something I don't understand :) > > 2009/9/14 Arnaud Garcia > >> Well, I think there is something I don't understand, I change again >> and, no change.. >> now I build a new ha

Re: getThreadObjectContext with domain parameter - code -

2009-09-14 Thread Arnaud Garcia
domain > name (for entire app). Map should be created on the fly if needed, in bind() > > 2009/9/14 Arnaud Garcia > >> OK, so I just change by adding new ObjectContext to a Map and set/get >> this Map from the ThreadLocal which is only as the map created one >> time

Re: getThreadObjectContext with domain parameter - code -

2009-09-14 Thread Arnaud Garcia
quot;) for domain=" + domain + " to ThreadLocal (" + threadObjectContext.hashCode() + ")"); } } } --- --- 2009/9/11 Andrey Razumovsky : > Well, looking at your code, I think you should not create new ThreadLocal > each time request is received (in bindThr

getThreadObjectContext with domain parameter - code -

2009-09-11 Thread Arnaud Garcia
Hello, I created a filter to use multi domains in a webapp, but I still have a problem, I don't find the bug... if someone can help me to fix it ! (I think that some people will also need this kind of filter, so this is why I post the complete code) So, the last bug is that sometimes the Obj

Re: DataContext cache WICKET

2009-09-08 Thread Arnaud Garcia
sion. This is likely your case. To bind a context to every session, use > something like WebApplicationContextFilter (works only if you have one > domain, you need something more complicated otherwise) > > 2. If you bind context to a session, as described in #1, you won't have SQL >

DataContext cache WICKET

2009-09-07 Thread Arnaud Garcia
Hi list, I am using cayenne and wicket, and I found no example to integrate both framework well, just a question of design for using the datacontext... Is it ok to use the datacontext in a singleton like this for a webapp private MyFacade() { ctxt = DataContext.createDataContext("D