AW: how to call a custom query

2007-02-01 Thread Peter Schröder
hi frank, you may use the object-graph to execute the queries you want. there is no joining with cayenne-syntax. cayenne will translate your query into an sql-statement with any joins that will be nessessary. so query += " FROM schedules"; query += " INNER JOIN procedures ON schedules.procedu

Re: how to call a custom query

2007-02-01 Thread Frank
I'm not sure why do you want to execute just a SQL. After doing query like you are proposing no data could be edited and saved back to db easily. Cayenne is a ORM, so why not getting a list of schedules ordered by procedure name: Expression exp = ExpressionFactory.matchExpr(Schedule.DATE_PROPERTY

Re: how to call a custom query

2007-02-01 Thread Frank
rawSelect.setFetchingDataRows(true);<< This seems to have resolved my issue, I can now list the missing fields. Thanks so much. Frank - Original Message - From: "Michael Gentry" <[EMAIL PROTECTED]> To: Sent: Thursday, February 01, 2007 10:04 PM Subject: Re: how to call a custom quer

Re: how to call a custom query

2007-02-01 Thread Marcin Skladaniec
Hi schedule_date = CURDATE(): what is the schedule_date data type ? Check if you are not comparing TIMESTAMP with DATE. I would use the functionality of NamedQuery. All you do you define a Query in Modeller, example : SELECT #result('count(*)' 'int' 'C') FROM $entityName $whereClause and

Re: how to call a custom query

2007-02-01 Thread Michael Gentry
Try adding, before you perform the query: rawSelect.setFetchingDataRows(true); Normally, Cayenne will want to create Java objects, but since your Schedules class doesn't have all of the fields, you need to fetch raw data rows. It should return a Map to you. See if this page helps at all: http

Re: how to call a custom query

2007-02-01 Thread Frank
Here is my code. My table show no data. I have three records for this query. I am trying to display procedure_name, provider_name, office_phone, alt_phone The _Schedules class does not have these fields. What do I need to do? Thanks Frank public List getRecords() { String query = "SELECT ALL

Re: how to call a custom query

2007-02-01 Thread Aristedes Maniatis
On 02/02/2007, at 11:16 AM, Christian Mittendorf wrote: P.S. The link to the API (http://cayenne.apache.org/1_2/api/ cayenne/org/objectstyle/cayenne/query/package-summary.html) from the 1.2 documentation returns a 404 error On what page do you see that link? The top of the 1.2 API is a

Re: how to call a custom query

2007-02-01 Thread Frank
Thank you. Frank - Original Message - From: "Christian Mittendorf" <[EMAIL PROTECTED]> To: Sent: Thursday, February 01, 2007 7:16 PM Subject: Re: how to call a custom query Please check out the documentation at the great new Cayenne homepage: http://cayenne.apache.org/doc20/queries

Re: how to call a custom query

2007-02-01 Thread Christian Mittendorf
Please check out the documentation at the great new Cayenne homepage: http://cayenne.apache.org/doc20/queries.html ...especially the part on SQLTemplates Christian P.S. The link to the API (http://cayenne.apache.org/1_2/api/cayenne/ org/objectstyle/cayenne/query/package-summary.html) from th

RE: Unsubscribe

2007-02-01 Thread Howard Treisman
Hi I just followed the instructions to unsubscribe from the "new" mailing list, but I'm still on it. What is the correct way to do this? Thanks, Howard PS No offence, I still love Cayenne, just going off the mailing list

Re: how to call a custom query

2007-02-01 Thread Frank
Can anyone help me with the a short example on how to do this? Thanks Frank - Original Message - From: "Frank" <[EMAIL PROTECTED]> To: Sent: Thursday, February 01, 2007 11:33 AM Subject: how to call a custom query Hello, I have the following raw query defined. SELECT BSYDTAA.BSYPE

Re: [ANN] New Web Site

2007-02-01 Thread Michael Gentry
As Andrus said, he "will list the site on www.apache.org shortly" ... so stay tuned. :-) Thanks! /dev/mrg On 2/1/07, Ahmed Mohombe <[EMAIL PROTECTED]> wrote: > http://cayenne.apache.org/ Nice but is still not linked from the Apache "TLP menu". http://www.apache.org/ (it should be between "be

Re: [ANN] New Web Site

2007-02-01 Thread Ahmed Mohombe
http://cayenne.apache.org/ Nice but is still not linked from the Apache "TLP menu". http://www.apache.org/ (it should be between "beehive" and "cocoon", right? :) ) so most users who don't know the above cayenne URL won't be able to find it. Ahmed.

Re: [ANN] New Web Site

2007-02-01 Thread Malcolm Edgar
looks great. regards Malcolm On 2/2/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: It is back. Looks really nice indeed. Andrus On Feb 1, 2007, at 4:08 PM, Michael Gentry wrote: > PS. Any chance of getting the mini-pepper back in the URL bar? I > loved that little touch. :-)

how to call a custom query

2007-02-01 Thread Frank
Hello, I have the following raw query defined. SELECT BSYDTAA.BSYPEMP.EMHSP#, BSYDTAA.BSYPEMP.EMYLNM, BSYDTAA.BSYPEMP.EMYFNM, BSYDTAC.BPRPPCP.PCDEP4, BSYDTAC.BPRPPCP.PCLDDS, BSYDTAA.BSYPEMP.EMEMP# AS EMEMP, BSYDTAA.BSYPEMP.EMWPH# AS WPHONE FROM BSYDTAA.BSYPEMP, BSYDTAC.BPRPPCP WHERE BSYDTAA.BS

Re: New user PK id question

2007-02-01 Thread Frank
Thanks for explaining this. It is working now. Regards, Frank

Re: [ANN] New Web Site

2007-02-01 Thread Andrus Adamchik
It is back. Looks really nice indeed. Andrus On Feb 1, 2007, at 4:08 PM, Michael Gentry wrote: PS. Any chance of getting the mini-pepper back in the URL bar? I loved that little touch. :-)

Re: New user PK id question

2007-02-01 Thread Frank
Thank you for the help. I have more questions. setPersistenceState 1. Does this go into the class extending your autogenerated class? 2. I removed the pk id from objEntity, but my table returns a null value for id. I am using the click framework also for my table. Frank - Original Messag

Re: New user PK id question

2007-02-01 Thread Andrus Adamchik
Yes, until 3.0 the logic in Cayenne worked like this: 1. if you don't map PK as an object property, Cayenne will generate the PK. 2. if you do map it, you must provide it yourself. (3.0 relaxed this restriction, but 3.0 is not officially released yet) Do not add the id to the properties expo

Re: New user PK id question

2007-02-01 Thread Christian Mittendorf
Hi! Do not add the id to the properties exposed by the autogenerated object. Just add the id property to the class extending your autogenerated class and use DataObjectUtils.pkForObject(this); to return the pk for the object (may or may not work, I'm not sure how auto_increment is handl

Re: New user PK id question

2007-02-01 Thread Frank
Yes, I get this error: Validation failure for stemc.cayenne.Employees.id: "id" is required. Frank - Original Message - From: "Peter Schröder" <[EMAIL PROTECTED]> To: Sent: Thursday, February 01, 2007 9:31 AM Subject: AW: New user PK id question did you set the pk-generation proper

AW: New user PK id question

2007-02-01 Thread Peter Schröder
did you set the pk-generation properly (database-generated) in the modeler? -Ursprüngliche Nachricht- Von: Frank [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 1. Februar 2007 15:23 An: user@cayenne.apache.org Betreff: New user PK id question Hello, I have a mysql table with a PK of i

Re: [ANN] New Web Site

2007-02-01 Thread Andrus Adamchik
Not sure if that's some ASF "branding script" that overrides the site image, but this is the image that I placed on the site: https://svn.apache.org/repos/asf/cayenne/site/trunk/tlp-site/target/ favicon.ico I may try to put it in a subdirectory and link from there. Andrus On Feb 1, 2007,

New user PK id question

2007-02-01 Thread Frank
Hello, I have a mysql table with a PK of id that is auto incremented. The getter is not generated for this pk. I need to use the pk id in a table as a link to allow the user to edit. If I add the pk id to the objEntity, whenever I try to add a record, cayenne complains that the pk id field cannot

AW: [ANN] New Web Site

2007-02-01 Thread Peter Schröder
looks really nice! ps cayenne rulz ;-) -Ursprüngliche Nachricht- Von: Andrus Adamchik [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 1. Februar 2007 14:55 An: user@cayenne.apache.org Betreff: [ANN] New Web Site As some may have noticed already, Cayenne website just moved, got a seri

Re: [ANN] New Web Site

2007-02-01 Thread Michael Gentry
A big thanks to Bruce and Ari. Looks clean and professional. Thanks so much for the design and hard work! /dev/mrg PS. Any chance of getting the mini-pepper back in the URL bar? I loved that little touch. :-) On 2/1/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: As some may have noticed a

[ANN] New Web Site

2007-02-01 Thread Andrus Adamchik
As some may have noticed already, Cayenne website just moved, got a serious facelift, and started to use Confluence as a CMS in the backend: http://cayenne.apache.org/ http://cayenne.apache.org/2007/02/01/new-web-site.html Thanks to Bruce and Ari for all the work they've put into it! Looks r