Re: QueryBySQL

2007-07-27 Thread k jee
, I have several SQLs already written. I want to use QueryBySQL to use the existing SQLs. The problem I am facing is how do I map the result set of these queries to my java classes, especially if I have a result set that includes fields from 3 tables then how do I map

Re: QueryBySQL

2007-07-26 Thread Armin Waibel
Hi Krupa, krupa wrote: Hi All, I have several SQLs already written. I want to use QueryBySQL to use the existing SQLs. The problem I am facing is how do I map the result set of these queries to my java classes, especially if I have a result set that includes fields from 3 tables then how do

QueryBySQL

2007-07-24 Thread krupa
Hi All, I have several SQLs already written. I want to use QueryBySQL to use the existing SQLs. The problem I am facing is how do I map the result set of these queries to my java classes, especially if I have a result set that includes fields from 3 tables then how do I map

Re: QueryBySQL

2007-07-24 Thread Dennis Bekkering
Hi, you could create a view and map that on a class that represents that view, then you dont need QueryBySQL. regards, Dennis 2007/7/24, krupa [EMAIL PROTECTED]: Hi All, I have several SQLs already written. I want to use QueryBySQL to use the existing SQLs. The problem I am facing is how

I would like to replace specific QueryBySQL by general QueryByCriteria

2005-06-20 Thread Hiller, Frank RD-AS2
Hi OJB users, I have a database table storing events combined with a timestamp, a deviceID specifying the device where the event occured and a unique ID. In some cases I have to know the latest event of a device that occured before a certain timestamp. At the moment I use QueryBySQL (see SQL

Re: sql Join request with QueryBySQL

2004-11-08 Thread Jakob Braeuchi
=CLIENTS.CL_ID + ON UTILISATEURS.UT_ID=CLIENTS.CL_ID + WHERE UT_VIS=+sVin; QueryBySQL queryBySql = new QueryBySQL(ClientsVO.class, sqlString); Collection clients = broker.getCollectionByQuery(queryBySql); In general, what is the syntax of triggering raw sql JOIN request with OJB using independant table (i.e

sql Join request with QueryBySQL

2004-11-07 Thread T. K. Chris
UTILISATEURS + LEFT OUTER JOIN CLIENTS + ON UTILISATEURS.UT_ID=CLIENTS.CL_ID + ON UTILISATEURS.UT_ID=CLIENTS.CL_ID + WHERE UT_VIS=+sVin; QueryBySQL queryBySql = new QueryBySQL(ClientsVO.class, sqlString); Collection clients = broker.getCollectionByQuery(queryBySql); In general, what is the syntax

QueryBySQL problems

2004-03-03 Thread McCaffrey, John G.
I would like to use QueryBySQL in situations where I have complicated, multi-join SQL. I have gotten it to work, using a complicated query, but when I call that same query again, I have a problem. A big problem. (no exception is thrown, but my entire websphere server shuts down.) In diagnosing

QueryBySQL and bind variables

2003-12-13 Thread ZZZ Liu
Hi, Could anybody tell me that whether QueryBySQL supports bind variables and how to do that? Thanks in advance! Z __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com

Re: Using QueryBySQL to retrieve sequence value

2003-12-10 Thread Jakob Braeuchi
hi antonio, your QueryBySql will look for a class Integer in the repository ! and it will fail. use a ReportQuery to obtain rows from the database. hth jakob Antonio Gallardo wrote: Hi: I need to take a value from a sequence in PostgreSQL. The first idea is to run something like: QueryBySQL q

Re: Using QueryBySQL to retrieve sequence value

2003-12-10 Thread Antonio Gallardo
Jakob Braeuchi dijo: hi antonio, your QueryBySql will look for a class Integer in the repository ! and it will fail. use a ReportQuery to obtain rows from the database. hth jakob Hi Jakob: Thanks for the answer. The problem here is I am just quering a nextval() from a sequence. I will try

Re: Using QueryBySQL to retrieve sequence value

2003-12-10 Thread Jakob Braeuchi
hi antonio, the queries provided by ojb require a class to be defined in the repository. you can use any class defined in the repository in the SQL-Query: QueryBySQL q = QueryFactory.newQuery(AnyClass.class,select mySequence.nextval from dual); Iterator iter

Re: Using QueryBySQL to retrieve sequence value

2003-12-10 Thread Antonio Gallardo
Jakob Braeuchi dijo: hi antonio, the queries provided by ojb require a class to be defined in the repository. you can use any class defined in the repository in the SQL-Query: QueryBySQL q = QueryFactory.newQuery(AnyClass.class,select mySequence.nextval from dual); Iterator iter

Re: Using QueryBySQL to retrieve sequence value

2003-12-10 Thread Jakob Braeuchi
: Jakob Braeuchi dijo: hi antonio, the queries provided by ojb require a class to be defined in the repository. you can use any class defined in the repository in the SQL-Query: QueryBySQL q = QueryFactory.newQuery(AnyClass.class,select mySequence.nextval from dual); Iterator iter

Using QueryBySQL to retrieve sequence value

2003-12-09 Thread Antonio Gallardo
Hi: I need to take a value from a sequence in PostgreSQL. The first idea is to run something like: QueryBySQL q = new QueryBySQL(Integer.class, SELECT nextval('mySequence');); Integer seq = (Integer)broker.getObjectByQuery(q); Is this correct? Exists another approach to do this? Best Regards

does QueryBySQL work?

2003-10-23 Thread Christopher Tava
Dear OJB user group, Is QueryBySQL supported? if so, are there any limitations? thank you, chris - Do you Yahoo!? The New Yahoo! Shopping - with improved product search

UNION with QueryBySql trick

2003-10-17 Thread Brian Chaplin
FYI. I have 2 different extents (PaymentDecision and CommitmentDecision) that extend the same class, Decision . Each is persisted in a different table. When I try to retrieve Decision using QueryBySQL, I have to associate one of the descendent tables to Decision in its class-description table

How to bind variables when using QueryBySQL

2003-10-14 Thread Zhe Liu
If this is not possible. Is it possible to write some extensions to OJB ? Thanks, Zhe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: How to bind variables when using QueryBySQL

2003-10-14 Thread Zhe Liu
If this is not possible. Is it possible to write some extensions to OJB ? Thanks, Zhe -Original Message- From: Zhe Liu [mailto:[EMAIL PROTECTED] Sent: Monday, October 13, 2003 7:36 PM To: [EMAIL PROTECTED] Subject: How to bind variables when using QueryBySQL Hi, I understand that if I

How to bind variables when using QueryBySQL

2003-10-13 Thread Zhe Liu
Hi, I understand that if I want to perform my own SQL queries in OJB, I can use QueryBySQL. But in order to use that, I have to pass the whole constructed SQL statement. I am wondering whether there is a way to pass prepare statement so that I can bind variables for different criteria? Thanks

Re: QueryBySQL for ojb rc4

2003-08-29 Thread Sng Wee Jim
Hi, Thanks Roland. I managed to get what is needed (ie. only selected columns) by QueryBySQL query1 = QueryFactory.newQuery(java.lang.Class, sql) ; Iterator itr = broker.getReportQueryIteratorByQuery(query1); maybe the FAQ section that mentions QueryBySQL should be updated to mention

QueryBySQL for ojb rc4

2003-08-28 Thread Sng Wee Jim
Hi, Anyone encountered problem with using the query type: QueryBySQL? I am doing something like QueryBySQL query1 = QueryFactory.newQuery(java.lang.Class, sql) ; Iterator itr = broker.getIteratorByQuery(query1); however the while iterating through the resultset, the object returned

Re: QueryBySQL for ojb rc4

2003-08-28 Thread Roland Carlsson
Jim [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 28, 2003 5:37 PM Subject: QueryBySQL for ojb rc4 Hi, Anyone encountered problem with using the query type: QueryBySQL? I am doing something like QueryBySQL query1 = QueryFactory.newQuery(java.lang.Class, sql

QueryBySQL endAtIndex() not working?

2003-07-24 Thread Brian Chaplin
When I issue a getIteratorByQuery when using a QueryBySQL, the startAtIndex and endAtIndex are ignored. When I issue a getCollectionByQuery on the query, it fails because it is a union: Query q = new QueryBySQL( PayeeTO.class, SELECT distinct mail_to_foreign_addr1,mail_to_city,mail_to_addr1