cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: [jira] Updated: (CAY-1282) Use #result as optional directive for only few columns (not all)
Date Fri, 16 Oct 2009 17:55:21 GMT

On Oct 16, 2009, at 8:04 PM, Andrey Razumovsky wrote:

> Actually, as already mentioned, we need to do something around CAY-942
> (query generics). This is very critical and desired API change

Not sure if we have another more precise Jira (since generics in  
relationships mentioned in this Jira have already been added).

Anyways, if we are talking about query generics, I did some research  
and prototyping of that in the past. My conclusion is that to do it  
right it has to be a rather dramatic change in Cayenne, affecting not  
simply the code, but a number design concepts. Essentially we have too  
many variables to squeeze into a rather rigid Java generics engine. To  
start, here is possible query result types:

  ? extends Persistent
  ? extends Object (unfinished POJO implementation)
  CayenneDataObject (as in "generic persistence" [1])
  DataRow
  scalar
  Object[] (a mix of scalars and any of the above)

I don't see how we can easily parameterize that in a meaningful way.

So my vote is to postpone this till 3.1 and make it a 3.1 priority to  
create an appropriate generics based query design, and maybe reduce  
the number of options. I don't think significantly delaying and  
radically changing 3.0 (that has been de-facto stable for some time)  
is a good idea.

Andrus

[1] http://cayenne.apache.org/doc/generic-persistent-class.html



Mime
View raw message