You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Robert S. Sfeir" <ro...@codepuccino.com> on 2004/02/04 05:17:01 UTC

Criteria with select with no where clause?

Can't seem to find a method which would allow me to add a criteria to 
return all records in a table.  select * from table without where 
clause... what's the trick?

R

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Criteria with select with no where clause?

Posted by Edson Carlos Ericksson Richter <ed...@mgrinformatica.com.br>.
Easy: Issue a query where criteria using a "null" as criteria.

Best regards,

Edson Richter
----- Original Message ----- 
From: Robert S. Sfeir 
To: OJB Users List 
Sent: Wednesday, February 04, 2004 1:17 AM
Subject: Criteria with select with no where clause?


Can't seem to find a method which would allow me to add a criteria to 
return all records in a table.  select * from table without where 
clause... what's the trick?

R

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 30/1/2004

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Criteria with select with no where clause?

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
Hennebelle wrote:

>Hi,
>
>You can create an empty criteria and not had clauses, like this :
>
>Criteria criteria = new Criteria();
>Query query = QueryFactory.newQuery(SitBO.class, criteria);
>  
>

heh, thanks not real obvious.

R

>-----Message d'origine-----
>De : Robert S. Sfeir [mailto:robert@codepuccino.com]
>Envoyé : mercredi 4 février 2004 05:17
>À : OJB Users List
>Objet : Criteria with select with no where clause?
>
>
>Can't seem to find a method which would allow me to add a criteria to
>return all records in a table.  select * from table without where
>clause... what's the trick?
>
>R
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


RE: Criteria with select with no where clause?

Posted by Hennebelle <ol...@sap.ap-hop-paris.fr>.
Hi,

You can create an empty criteria and not had clauses, like this :

Criteria criteria = new Criteria();
Query query = QueryFactory.newQuery(SitBO.class, criteria);

-----Message d'origine-----
De : Robert S. Sfeir [mailto:robert@codepuccino.com]
Envoyé : mercredi 4 février 2004 05:17
À : OJB Users List
Objet : Criteria with select with no where clause?


Can't seem to find a method which would allow me to add a criteria to
return all records in a table.  select * from table without where
clause... what's the trick?

R

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org