aspose file tools
The moose likes JDBC and the fly likes jdo query using boolean flag (bit) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "jdo query using boolean flag (bit)" Watch "jdo query using boolean flag (bit)" New topic
Author

jdo query using boolean flag (bit)

Matt Horton
Ranch Hand

Joined: Feb 06, 2002
Posts: 107
the jdo spec makes the comment: "ordering specification: the ordering specification includes a list of expressions with the ascending/descending indicator. the expression's type must be one of"
and then it gives a list, at the top of which is:
*primitive types except boolean;
I read this to indicate that I cannot order by a boolean flag. Fine, whatever. But I can't seem to construct a query using a boolean, period (see the period? --> ) . The following queries:
"somebitfieldthatjdomapsasbool != 0"
"somebitfieldthatjdomapsasbool == true"
"somebitfieldthatjdomapsasbool" (assuming some variant of oql)
"somebitfieldthatjdomapsasbool <> 0"
yadda yadda yadda, all throw exceptions, some of which make point that there is an error near "order". I'd paste several of the exceptions, but jdo isn't supported yet, and the exception classes are rarely even visible in the java bug database, so I'm not sure how helpful they would be.
My simple question is, do any of my oql statements seem obviously incorrect? Other flags work fine, e.g. "id == 1", "internalID == 'h123'", etc.
Thanks in advance. It would seem silly for jdo to not support bools in queries, so I know I'm doing something stupid. I just haven't found it yet.
Thanks again.
[ February 22, 2002: Message edited by: matt horton ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdo query using boolean flag (bit)
 
Similar Threads
Welcome David Jordan and Craig Russell to our Book Promotion of the Week
Somewhat frustrated
Deciding on a data structure to optimize performance
When not to user container
Use threads to "stop" the execution of a method without a "return"?