Re: Add ActiveRecord support to Cayenne

2012-12-29 Thread Mike Kienenberger
On Sat, Dec 29, 2012 at 8:34 PM, Ashley Aitken wrote: >> Having used to actively develop Cayenne applications, but more >> recently having to develop using JPA, which uses an AR approach, I can >> say that it doesn't actually work or help to mix AR and Unit-of-work >> Cayenne DataContext concepts.

Re: Add ActiveRecord support to Cayenne

2012-12-29 Thread Ashley Aitken
On 30/12/2012, at 1:50 AM, Mike Kienenberger wrote: > On Sat, Dec 29, 2012 at 8:33 AM, Ashley Aitken wrote: >> Finally, I am also not sure how something like ActiveRecord approach would >> actually work, or be compatible with, Cayenne. To my mind it defeats the >> whole purpose of having a c

Re: Add ActiveRecord support to Cayenne

2012-12-29 Thread Mike Kienenberger
On Sat, Dec 29, 2012 at 8:33 AM, Ashley Aitken wrote: > Finally, I am also not sure how something like ActiveRecord approach would > actually work, or be compatible with, Cayenne. To my mind it defeats > the whole purpose of having a container managing the persistence of a > collection of objec

Re: Add ActiveRecord support to Cayenne

2012-12-29 Thread Ashley Aitken
Hello All, I hope you don't mind me jumping into this conversation but I find it very interesting (particularly the discussion of rich vs. anemic domain models but also of the ActiveRecord approach, especially today as alternative approaches to persistence, under the banner of NOSQL, are gain

Re: Add ActiveRecord support to Cayenne

2012-12-29 Thread Malcolm Edgar
emeka okafor wrote: > Sorry about that. > > > > From: Andrus Adamchik > To: user@cayenne.apache.org > Sent: Thursday, December 27, 2012 4:31 PM > Subject: Re: Add ActiveRecord support to Cayenne > > While we all have our own approach

Re: Add ActiveRecord support to Cayenne

2012-12-27 Thread emeka okafor
Sorry about that. From: Andrus Adamchik To: user@cayenne.apache.org Sent: Thursday, December 27, 2012 4:31 PM Subject: Re: Add ActiveRecord support to Cayenne While we all have our own approaches to programming, let's filter the language and k

Re: Add ActiveRecord support to Cayenne

2012-12-27 Thread Andrus Adamchik
While we all have our own approaches to programming, let's filter the language and keep a respectful technical conversation. Some things said in this thread are simply not appropriate, besides being beyond the point. We are not going to tolerate this. We have a traditionally friendly community

Re: Add ActiveRecord support to Cayenne

2012-12-27 Thread Дробеня Илья
> > > From: Juan José Gil > > To: user@cayenne.apache.org; emeka okafor > > Sent: Thursday, December 27, 2012 3:48 AM > > Subject: Re: Add ActiveRecord support to Cayenne > > > > Pardon my ignorance, I really don't understan

Re: Add ActiveRecord support to Cayenne

2012-12-27 Thread Malcolm Edgar
link > http://www.wocommunity.org > > Regards. > > > > From: Juan José Gil > To: user@cayenne.apache.org; emeka okafor > Sent: Thursday, December 27, 2012 3:48 AM > Subject: Re: Add ActiveRecord support to Cayenne > > Pardon

Re: Add ActiveRecord support to Cayenne

2012-12-27 Thread emeka okafor
support to Cayenne Pardon my ignorance, I really don't understand what do you mean with >>Beside that I rather do simple stuffs like the webobjects guys do. You do not hear them complain about such >>things like services, and dependency injection and what not I don't know a

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Andrus Adamchik
Also FWIW, we are trying to build the same fluent APIs in Cayenne itself, so to me Ilya's proposal is simply reassigning the existing and planned query APIs to objects themselves - a very simple "transposition". I.e. this proposal is just a different style for what we already have or will have

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Andrus Adamchik
I think the idea is to combine the new API with existing Cayenne facilities for providing thread-bound ObjectContext based on some custom strategy (e.g. CayenneFilter [1]) and then using the API within a single thread context. And committing via a single static class (instead of committing indiv

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Andrus Adamchik
> cayenne you have an anemic domain model, which is not true. > /end of the rant > > > > From: Andrus Adamchik > To: user@cayenne.apache.org > Sent: Wednesday, December 26, 2012 6:25 PM > Subject: Re: Add ActiveRecord support to Cayenne >

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Aristedes Maniatis
On 26/12/12 6:48pm, Дробеня Илья wrote: This is the best OOP design. And for me need to separate context only when we need anvanced features that do not possible in current design. Let's take: a.delete() b.delete() a.commitChanges() Are there two separate contexts there so I committed only th

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Juan José Gil
; 2012/12/27 emeka okafor > > > >> It depends on what you call service. Is a service a message call that is > >> remote in the sense that it is outside of the same JVM or is a service > any > >> random function that do not belong to the domain object? If I am >

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Juan José Gil
Pardon my ignorance, I really don't understand what do you mean with >>Beside that I rather do simple stuffs like the webobjects guys do. You do not hear them complain about such >>things like services, and dependency injection and what not I don't know anything about WO :( I would really apprec

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Дробеня Илья
ects become naked(cayenne is not to blame for that). >> Personally I would rather program in groovy with metaprogramming than do >> all that stuff if I had to. Beside that I rather do simple stuffs like the >> webobjects guys do. You do not hear them complain about such things lik

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Дробеня Илья
> > From: Juan José Gil > To: user@cayenne.apache.org; emeka okafor > Sent: Wednesday, December 26, 2012 10:32 PM > Subject: Re: Add ActiveRecord support to Cayenne > > @emeka, in that regar of having rich models, how are you resolving the >

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread emeka okafor
ActiveRecord support to Cayenne @emeka, in that regar of having rich models, how are you resolving the injection of services in your models? Or are you accessing your dependencies using static factories? @Дробеня Илья, in some pet projects I was using some very "powered" templates, wich con

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Juan José Gil
what does it have to do with > active records, actually nothing. It is just that someone said that with > cayenne you have an anemic domain model, which is not true. > /end of the rant > > > > From: Andrus Adamchik > To: user@cayenne.apache

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread emeka okafor
ayenne you have an anemic domain model, which is not true. /end of the rant From: Andrus Adamchik To: user@cayenne.apache.org Sent: Wednesday, December 26, 2012 6:25 PM Subject: Re: Add ActiveRecord support to Cayenne In ROP case the root cause is 2 separat

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Andrus Adamchik
In ROP case the root cause is 2 separate disjoint models (doesn't matter rich or anemic). A single anemic model would've allowed to define a common set of "services". So while I am still on this rant, I think the "rich/anemic model" discussion at the end may come down to modularity requirements

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Aristedes Maniatis
On 26/12/12 11:40am, Andrus Adamchik wrote: Ilya's point that we discussed a bit offline was that AR-like design is more object-oriented, with object providing all operations on themselves. The context will be taken from the current thread (something we already provide). One piece of theory beh

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Andrus Adamchik
Yeah, I was also going to suggest that instead of adding this to the core and then throwing out (or not), we do it another way - create it as a separate project (either in Cayenne SVN sandbox, or maybe even on GitHub) and see what comes out. Ilya's point that we discussed a bit offline was that

Re: Add ActiveRecord support to Cayenne

2012-12-26 Thread Aristedes Maniatis
On 23/12/12 3:52pm, Дробеня Илья wrote: From my estimates - we spent on development ~ 1 week, if during year this feature do not will be used by anybody - we may remove it. What do you think? Sure, as long as you keep this as a wrapper outside of Cayenne itself. Although measuring usage in an

Re: Add ActiveRecord support to Cayenne

2012-12-23 Thread Дробеня Илья
Ari, we may propose to users select schema that he want - maybe somebody want tro use ActiveRecord. But classic Cayenne architecture will be used anyway. But if user want - he may use ActiveRecord. From my perspective - Cayenne - best framework for add this feature, and for RoR fans it may be very

Re: Add ActiveRecord support to Cayenne

2012-12-23 Thread Aristedes Maniatis
On 20/12/12 4:18am, Andrus Adamchik wrote: Now in Ruby (which I barely know) I suppose ActiveRecord is such a great RAD technology, because when you control the DB, you can sort of avoid (or minimize) the*mapping* step. To an extent. ActiveRecord (and most of Rails) is configuration by conve

Re: Add ActiveRecord support to Cayenne

2012-12-20 Thread Andrus Adamchik
I was trying to wrap my head around the idea for a couple of days, so here is my thoughts so far... BTW here are a few similar proposals by David Marko: this one: https://issues.apache.org/jira/browse/CAY-877 and especially this one: https://issues.apache.org/jira/browse/CAY-988 Here all the n

Re: Add ActiveRecord support to Cayenne

2012-12-19 Thread Дробеня Илья
2012/12/19 Michael Gentry > One of the dangers of having delete/save/update Update method do not needed, delete method is useful - because it remove entity from context. And instead of save method - we may create methods - seems like commitContext, rollbackContext. Also we may create it in "Rol

Re: Add ActiveRecord support to Cayenne

2012-12-18 Thread Michael Gentry
One of the dangers of having delete/save/update in a DAO is that most people familiar with DAOs may not realize that more than the specified object will be deleted/saved/updated since Cayenne works on the context-level and potentially everything in the context will get committed. I don't mind fetc

Re: Add ActiveRecord support to Cayenne

2012-12-18 Thread Дробеня Илья
ot;user@cayenne.apache.org" > Sent: Tuesday, December 18, 2012 7:01 PM > Subject: Re: Add ActiveRecord support to Cayenne > > I would welcome the addition of some DAO (data access object) methods in > the entity templates that make it even easier to query the DB. For

Re: Add ActiveRecord support to Cayenne

2012-12-18 Thread Pascal Robert
plates) since at least 2008 (if not before). > > > From: John Huss > To: "user@cayenne.apache.org" > Sent: Tuesday, December 18, 2012 7:01 PM > Subject: Re: Add ActiveRecord support to Cayenne > > I would welcome the addition of

Re: Add ActiveRecord support to Cayenne

2012-12-18 Thread emeka okafor
Coming from EOF? I think those static helper classes are missing but it is not that bad either. From: John Huss To: "user@cayenne.apache.org" Sent: Tuesday, December 18, 2012 7:01 PM Subject: Re: Add ActiveRecord support to Cayenne I would w

Re: Add ActiveRecord support to Cayenne

2012-12-18 Thread emeka okafor
ing done EOF at some point in my life. Let the discussion start  From: Дробеня Илья To: user@cayenne.apache.org Sent: Tuesday, December 18, 2012 12:09 AM Subject: Add ActiveRecord support to Cayenne Hi! Now Cayenne usage in projects looks like data mapper (Fowle

Re: Add ActiveRecord support to Cayenne

2012-12-18 Thread John Huss
I would welcome the addition of some DAO (data access object) methods in the entity templates that make it even easier to query the DB. For example I have these defined in my entity template: public static List fetchAll(ObjectContext ec); public static List fetchAll(ObjectContext ec, List sortOr

Add ActiveRecord support to Cayenne

2012-12-17 Thread Дробеня Илья
Hi! Now Cayenne usage in projects looks like data mapper (Fowler), but all entities has dependecy on Cayenne (interface Persistent). For data mapper it is disadvantage. But it is acceptable for ActiveRecord. This is my first reason to propose this solution. Second reason - we may simple add all po