This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes Castor -- using GROUP BY to retrieve data from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Castor -- using GROUP BY to retrieve data from database" Watch "Castor -- using GROUP BY to retrieve data from database" New topic
Author

Castor -- using GROUP BY to retrieve data from database

Sree Potluri
Ranch Hand

Joined: Aug 12, 2009
Posts: 62
Hi,

I am trying to get the count of columns present in database. I have column1, column2, column3, table is tableName in database and class1 is the class which maps to database.
To get the count of number of records in database, I use the query:

I want to use a query where I can directly use column and table name from database.


When I am running this using castor, I am getting error as "org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect token of type was found near , (found COMMA, but expected RIGHT_PAREN)
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19434
    
  10

I don't see anything about XML in this post. Looks like what Castor calls "Java-to-SQL persistence". So let's move this to the ORM forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Castor -- using GROUP BY to retrieve data from database