Re: Unique Indexes with the modeller

2011-02-16 Thread Marcin Skladaniec
This is my thinking as well. Indeed I have unique indexes defined on the database level. After reading this thread it seems like I need to remove them until cayenne adds support for it. Thanks. Marcin On 17/02/11 12:11 AM, Michael Gentry wrote: I think this discussion kind of ties into Marci

Re: ObjectContext per thread or per app?

2011-02-16 Thread Michael Gentry
Hi Christian, You'll typically have at least one context-per-user. (Not always, but typically.) The patterns we use here are to have a thread-based context-per-user and also separate (peer or child) contexts on our edit pages. This lets us isolate the edit changes in a different context (and wi

Re: Unique Indexes with the modeller

2011-02-16 Thread Michael Gentry
I think this discussion kind of ties into Marcin's question yesterday (which I haven't had a chance to thoroughly read his latest reply). I believe Marcin's problem is the unique index was defined outside the model and Cayenne doesn't know that it needs to do a delete before an insert on the recor

Re: Unique Indexes with the modeller

2011-02-16 Thread Andrus Adamchik
On Feb 16, 2011, at 2:20 PM, Christian Grobmeier wrote: > I am very +1 on adding this feature to the modeller. Even when it may > go further to standard ORM, the modeller cannot be used alone for > working with cayenne. On the other hand there is no chance to prevent > the loss of indexes when th

Re: Unique Indexes with the modeller

2011-02-16 Thread Christian Grobmeier
> Also note that the underlying argument about this feature is whether > CayenneModeler (and consequently map.xml) should include general DB admin > functions not relevant to the ORM. Even though back in 2005 I said "I am for > adding more DB admin functions to the Modeler", I am still on the fe

Re: Unique Indexes with the modeller

2011-02-16 Thread Andrus Adamchik
See my other email on the philosophy behind it. On Feb 16, 2011, at 2:10 PM, Christian Grobmeier wrote: > On Wed, Feb 16, 2011 at 1:04 PM, Andrey Razumovsky > wrote: >> It's not supported by Cayenne, though it's a long-standing request. If >> you're willing to watch or contribute, you can follow

Re: Unique Indexes with the modeller

2011-02-16 Thread Andrus Adamchik
Also note that the underlying argument about this feature is whether CayenneModeler (and consequently map.xml) should include general DB admin functions not relevant to the ORM. Even though back in 2005 I said "I am for adding more DB admin functions to the Modeler", I am still on the fence on

Re: Unique Indexes with the modeller

2011-02-16 Thread Christian Grobmeier
On Wed, Feb 16, 2011 at 1:04 PM, Andrey Razumovsky wrote: > It's not supported by Cayenne, though it's a long-standing request. If > you're willing to watch or contribute, you can follow > https://issues.apache.org/jira/browse/CAY-204 I am watching now. I am bit curious... this feature seems ver

Re: Unique Indexes with the modeller

2011-02-16 Thread Andrey Razumovsky
It's not supported by Cayenne, though it's a long-standing request. If you're willing to watch or contribute, you can follow https://issues.apache.org/jira/browse/CAY-204 2011/2/16 Marek Šabo : > Actually I would like to know whether there is any support for this in cm > because I've been appendin

Re: Unique Indexes with the modeller

2011-02-16 Thread Marek Šabo
Actually I would like to know whether there is any support for this in cm because I've been appending them manually in generated schemata. On 02/16/2011 12:40 PM, Christian Grobmeier wrote: Hello, how can I create a unique index on a column with the modeller? Couldn't find any information even

Unique Indexes with the modeller

2011-02-16 Thread Christian Grobmeier
Hello, how can I create a unique index on a column with the modeller? Couldn't find any information even with google :-) I also could not find any info about indexing in Cayenne in general... my tables are all without an index (except my primary key, which is indexed by default). I am using Cay

Re: ObjectContext per thread or per app?

2011-02-16 Thread Christian Grobmeier
Thanks Andrey, this helped. Christian On Wed, Feb 16, 2011 at 10:56 AM, Andrey Razumovsky wrote: > Hi Christian, > > In case of Web application it is incorrect to have one ObjectContext, > because you can't really know which session added certain changes, so > you'll be facing tons of multithread

Re: ObjectContext per thread or per app?

2011-02-16 Thread Andrey Razumovsky
Hi Christian, In case of Web application it is incorrect to have one ObjectContext, because you can't really know which session added certain changes, so you'll be facing tons of multithreading issues, e.g. one session will commit other session's partial changes. Common way is to have one context

ObjectContext per thread or per app?

2011-02-16 Thread Christian Grobmeier
Hello, sorry, a dumb question: do I need a ObjectContext per thread or per app? In fact I wrote a spring bean (its a singleton) which creates one single ObjectContext for all my app. In other terms, multiple threads will use it to insert, read, commit etc. Since ObjectContext offers the commit m