Re: QueryChain

2008-08-20 Thread Eric Polino
On Wed, Aug 20, 2008 at 2:22 PM, Eric Polino <[EMAIL PROTECTED]> wrote: > Alright sweet! That was it! Thanks. > > Now, QueryChain always returns DataRows because it can't know how to > marshal objects. Clearly the results from the three queries being run > in the followi

Re: QueryChain

2008-08-20 Thread Eric Polino
7; method will only return the first result set, no matter how > many results you have in the query. To get all results, you will need to use > a different method for select: > > QueryResponse result = context.performGenericQuery(query); > > Then you can scan vis the QueryResponse

QueryChain

2008-08-19 Thread Eric Polino
// "1" System.out.println(dr.keySet().size()); // "1" System.out.println("FOO1 " + dr.get("FOO1")); // "FOO1 123" System.out.println("FOO2 " + dr.get("FOO2")); // "FOO2 null" System.out.println("FOO3 " + dr.get("FOO3")); // "FOO3 null" TIA, Eric -- Eric Polino Campground Automated Systems

Query Issues

2008-06-17 Thread Eric Polino
bjectResolver.java:100) at org.apache.cayenne.access.DataDomainQueryAction.interceptObjectConversion(DataDomainQueryAction.java:464) at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:129) at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:746) -- Eric Polino Campground Automated Systems

Re: joins

2008-05-22 Thread Eric Polino
d_comuna", this.getId()); >parameters.put("ano", ano); > >SQLTemplate query = new SQLTemplate(Persona.class, sql); >query.setParameters(parameters); >System.err.println(query.toString()); > >return Da

Re: joins

2008-05-22 Thread Eric Polino
"foo"); > > SelectQuery query = new SelectQuery(Reservation.class, qualifier ); > > On 5/22/08, Eric Polino <[EMAIL PROTECTED]> wrote: >> On Thu, May 22, 2008 at 5:23 PM, Eric Polino >> <[EMAIL PROTECTED]> wrote: >> > Given three ta

Re: joins

2008-05-22 Thread Eric Polino
On Thu, May 22, 2008 at 5:23 PM, Eric Polino <[EMAIL PROTECTED]> wrote: > Given three tables (This is not accurate SQL syntax...but you get the point). > > Reservation { > ... > siteId int foreign key with Site, > ... > } > > Site { > ... > siteId int

joins

2008-05-22 Thread Eric Polino
), ... } How can I do the following SQL statement using Expression, ExpressionFactory, SelectQuery, etc? select * from Reservation r, Site s, SiteType st where r.siteId = s.siteId and s.typeId = st.siteTypeId and st.name = 'foo' TIA. -- Eric Polino Campground Automated Systems

Re: Postgresql

2008-05-22 Thread Eric Polino
Thanks for the help. I managed to get it working. I figured out that the init scripts weren't portable from derby to postgres. On Tue, May 6, 2008 at 2:43 PM, Tore Halset <[EMAIL PROTECTED]> wrote: > > On 6. mai. 2008, at 17.43, Eric Polino wrote: > >> We were using

Postgresql

2008-05-06 Thread Eric Polino
here it doesn't fail when attempting to setup the db via the schema it fails when trying to run some insert statements Pieces of the build.xml that might be of help: -- Eric Polino Campground Automated Systems

Listing Attributes

2008-03-24 Thread Eric Polino
Is there a way I can get a List of the attributes for a given DBEntity? For instance, I have a customer. I want an iteratable list of fields I can query on. How can I do that? -- Eric Polino Campground Automated Systems

Re: Google Summer of Code 2008

2008-03-19 Thread Eric Polino
re of cayenne, so it's less probable that they'll > > be subscribed here and see this :). Though true, there are some here. I, for one, am a GSoC alumnus from last year. Unfortunately, I'm not able to be part of the program this summer. Cheers, Eric > > > > just an idea, > > > > Ahmed. > > > > > -- Eric Polino Campground Automated Systems

Re: Expression string

2008-03-05 Thread Eric Polino
; When you use an SQLTemplate, you are generating the SQL (except for > > the caveats of #result and friends), not Cayenne. You can issue > > whatever SQL you want to the DB. > > > > /dev/mrg > > > > > > > > On Wed, Mar 5, 2008 at 2:37 P

Re: Expression string

2008-03-05 Thread Eric Polino
.. > Map parameters = new HashMap(); > parameters.put("id", role.getPrimaryKey()); > > SQLTemplate rawSelect = new > SQLTemplate(com.xyz.entity.Group.class, sql); > rawSelect.setParameters(parameters); > > return threadDataCo

Re: Expression string

2008-03-05 Thread Eric Polino
On 3/5/08, Eric Polino <[EMAIL PROTECTED]> wrote: > On 3/3/08, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > > Two options: > > > > 1. SQLTemplate > > 2. Cayenne 3.0/EJBQL (with EJBQL is still sort of alpha, so for > > subqueries I'd sugg

Re: Expression string

2008-03-05 Thread Eric Polino
current code. If you spot anything that I could be doing better, I'd also appreciate any tips. I often struggle finding good docs for how to do certain things in Cayenne and my Java is rusty, been living in C for a while now. http://pastebin.ca/929355 TIA, Eric > > Andrus > > &g

Re: Expression string

2008-03-03 Thread Eric Polino
t to switch over to SQLTemplate: > > http://cayenne.apache.org/doc20/sqltemplate-query.html > > It can return data objects for you, which I believe is what you want. > You might be able to rewrite your SQL, too, in a manner that would > work with Expression.fromString. > >

Re: Expression string

2008-03-03 Thread Eric Polino
e WHERE clause as shown on > this page: > > http://cayenne.apache.org/doc20/building-expressions.html > > The BNF likewise does not list SELECT, either: > > http://cayenne.apache.org/doc20/bnf-for-expressionparser.html > > /dev/mrg > > > > On Mon, Mar 3, 2008 at 3:30 PM, Er

Re: Expression string

2008-03-03 Thread Eric Polino
; using "select *"? > > From reviewing my own SQLTemplate code > > "select" > + " #result('s.ID' 'long' 'ID')," > + " #result('s.SHORT_NAME' 'String' 'SHORT_N

Re: Expression string

2008-03-03 Thread Eric Polino
after the 's' in "SA.Site s". So the first line reads "select * from SA.Site s " + -- Eric Polino Campground Automated Systems

Re: Expression string

2008-03-03 Thread Eric Polino
ing > some issues with the subqueries. > > > Fredrik Liden > ENLASO Corp. > > > > -Original Message- > From: Eric Polino [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2008 1:30 PM > To: user@cayenne.apache.org > Subject: Expression string

Expression string

2008-03-03 Thread Eric Polino
committed. Mar 3, 2008 3:17:36 PM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: [v.2.0.4 October 12 2007] Encountered "Site" at line 1, column 15. Was expecting one of: "or" ... "and" ... "not" ... "!" ... I t

Re: questions

2008-02-13 Thread Eric Polino
> No ... we are lucky to have limited web access. :-) (Even internal > web access is limited.) Wow, either a cool place to work with high security...or just a prison ;) (this is aluink, i transfered my subscription to my work email) > > On Feb 13, 2008 3:40 PM, Eric Polino <[

Re: questions

2008-02-13 Thread Eric Polino
Got ssh? I'd be glad to offer a few tunnels!! On Feb 13, 2008 3:35 PM, Michael Gentry <[EMAIL PROTECTED]> wrote: > Some of us are behind rather restrictive firewalls, too. :-) > > > On Feb 13, 2008 3:31 PM, Kevin Menard <[EMAIL PROTECTED]> wrote: > > > I've been trying to get the channel going, b

Re: questions

2008-02-13 Thread Eric Polino
when putting together a release. > > /dev/mrg > > > > On Feb 13, 2008 3:18 PM, Eric Polino <[EMAIL PROTECTED]> wrote: > > > > Oh, no insult incured. I'm appreciating the help you guys are giving > > me, I'm in no position to complain. I'v

Re: questions

2008-02-13 Thread Eric Polino
On Feb 13, 2008 3:12 PM, Kevin Menard <[EMAIL PROTECTED]> wrote: > On 2/13/08 2:35 PM, "Eric Polino" <[EMAIL PROTECTED]> wrote: > > > > > I've been doing stuff like this already, that is simple. I'm talking > > about doing stuff like

Re: questions

2008-02-13 Thread Eric Polino
On Feb 13, 2008 2:36 PM, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > On Feb 13, 2008, at 1:48 PM, Eric Polino wrote: > > 1. How do I count the rows of a query, without actually doing a full > > blown SelectQuery and counting the elements? ie: select count(*) from > &g

Re: questions

2008-02-13 Thread Eric Polino
much applies to Cayenne 2.0 and 3.0, too. Look at that > page and do a search/find for "expression". There are many examples > of creating query expressions using joins in that example. Let us > know if you continue to have questions. > > Thanks, > > /dev/mrg > &g

Re: questions

2008-02-13 Thread Eric Polino
On Feb 13, 2008 2:26 PM, Kevin Menard <[EMAIL PROTECTED]> wrote: > On 2/13/08 2:04 PM, "Eric Polino" <[EMAIL PROTECTED]> wrote: > > > >>> 2. I've read in many places how Cayenne deals with joins for you, but > >>> nowhere do I see an e

Re: questions

2008-02-13 Thread Eric Polino
On Feb 13, 2008 1:57 PM, Kevin Menard <[EMAIL PROTECTED]> wrote: > Comments in-line. > > > On 2/13/08 1:48 PM, "Eric Polino" <[EMAIL PROTECTED]> wrote: > > > I've started using Cayenne a few weeks ago for our project, > > www.campgroundau

questions

2008-02-13 Thread Eric Polino
I've started using Cayenne a few weeks ago for our project, www.campgroundautomation.com. In the process of working with it, I've come across a few things I don't understand. After reading the API and the UserGuide, can't find much to help me. 1. How do I count the rows of a query, without actu