RelationshipQuery

2010-04-25 Thread Joe Baldwin
I asked this question previously but did not see a reply. I am trying to create a very fast custom fetch that is essentially a qualified relationship. My relationships are based on an integer "oid" field. Can I use the RelationshipQuery and qualify it? Or am I on the wrong track?

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrew Lindesay
Hi Ari; Another question on this; if I "page around the list" are the objects not in the "current page" subject to garbage collection? cheers. >> Aha! (penny drops) -- ok that is the behaviour I'm after. Thanks to both of >> you for talking this through. I've written some material to go at t

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Aristedes Maniatis
On 25/04/10 10:40 PM, Andrew Lindesay wrote: Aha! (penny drops) -- ok that is the behaviour I'm after. Thanks to both of you for talking this through. I've written some material to go at the top of "SelectQuery" javadoc to confirm my understanding and augment the javadoc for others; I comm

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrew Lindesay
Hi Ari; Aha! (penny drops) -- ok that is the behaviour I'm after. Thanks to both of you for talking this through. I've written some material to go at the top of "SelectQuery" javadoc to confirm my understanding and augment the javadoc for others; Paginated Mode By configuring an instance of

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Aristedes Maniatis
On 25/04/10 8:33 PM, Andrew Lindesay wrote: In actual fact, I want to get the primary keys so that I can randomly page-through a list of ObjectId-s faulting a page at a time. Are you perhaps misunderstanding the way pagination works or am I missing what you want to do? When you get a paginate

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrew Lindesay
Hello Andrus; > Not impossible, but is indeed rather involved and I don't see much point > doing it. I worked through SelectTranslator.appendQueryColumns(..) and I assume this method would require quite a bit of re-hashing -- yes; looks like hard work to change! In actual fact, I want to get

Re: Missing code in Cayenne Guide

2010-04-25 Thread Aristedes Maniatis
On 25/04/10 7:59 PM, Aristedes Maniatis wrote: On 25/04/10 6:54 PM, Andrus Adamchik wrote: Hi Ari, did you have a chance to look at it? Indeed the code blocks do not render at all on the site. I didn't because Confluence has been down every time I tried to look. I'll see now. My first hunch

Re: Missing code in Cayenne Guide

2010-04-25 Thread Aristedes Maniatis
On 25/04/10 6:54 PM, Andrus Adamchik wrote: Hi Ari, did you have a chance to look at it? Indeed the code blocks do not render at all on the site. I didn't because Confluence has been down every time I tried to look. I'll see now. Ari -- --> Aristedes Maniatis GPG fi

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrus Adamchik
On Apr 25, 2010, at 5:17 PM, Andrew Lindesay wrote: Hi Andrus; I would rather not have free-form query strings in my code; I prefer compiling against the Cayenne query-assembly objects. Yeah, that's a somewhat unfortunate situation, as there are plans for SelectQuery-like API for EJBQL in

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrew Lindesay
Hi Andrus; >> I would rather not have free-form query strings in my code; I prefer >> compiling against the Cayenne query-assembly objects. > Yeah, that's a somewhat unfortunate situation, as there are plans for > SelectQuery-like API for EJBQL in 3.1, but the old API for specifying columns > i

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrus Adamchik
On Apr 25, 2010, at 5:07 PM, Andrew Lindesay wrote: I would rather not have free-form query strings in my code; I prefer compiling against the Cayenne query-assembly objects. Yeah, that's a somewhat unfortunate situation, as there are plans for SelectQuery-like API for EJBQL in 3.1, but th

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrew Lindesay
Hi Andrus; Thanks for the speedy response. I saw this facility in the 2.0 API. I would rather not have free-form query strings in my code; I prefer compiling against the Cayenne query-assembly objects. Do you think this would be a tricky thing for me to safely implement in the 3.0-TRUNK? che

Re: Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrus Adamchik
We had this functionality prior to Cayenne 3.0. Now the recommended way to specify columns is to use EJBQLQuery instead of SelectQuery. It would return either a list of scalars or list of Object[], depending on a number of columns in the query. E.g.: "select a.artistName from Artist a" And

Re: Missing code in Cayenne Guide

2010-04-25 Thread Andrus Adamchik
Hi Ari, did you have a chance to look at it? Indeed the code blocks do not render at all on the site. Andrus On Apr 23, 2010, at 8:53 PM, Michael Gentry wrote: Hmm, I wonder if Confluence is having issues again. On Fri, Apr 23, 2010 at 7:38 AM, Borut Bolčina m> wrote: Hello, I am browsi

Fetching Specified "Raw Rows" with SelectQuery

2010-04-25 Thread Andrew Lindesay
Hello; The "SelectQuery" has the method "setFetchingDataRows()" which I understand to mean that the query will return a List. I would also like to specify the attribute properties or similar which I would like to be returned for the query –– is this possible with Cayenne? For those who are als