Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

testing JPQL

 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My practice is to run SQL in Toad (ORACLE tool) & then use query in Java (application).

Is there way to test JPQL query? (before using JPQL in app).
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepika,

There is no such tool that I know of. However, this could be a really excellent enhancement for Eclipse JPA tools: http://www.eclipse.org/webtools/dali/main.php. Perhaps you could enter a JIRA there? I am sure it would be received well...

Best regards,
Reza
 
Raf Szczypiorski
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At a time I also was looking for a tool like this, and ended up with Hibernate Tools and their Hibernate Console, which allows you to write ad hoc HQL queries, see the resulting SQL and actually fire them against your database. If you stick to the JPQL standard, you should be fine, but note tht HQL is a little more relax and is richer (for example, in fetch joins, it allows you to give the fetched collection a name and use it in where clause, whereas JPQL insists that you don't give it a name).
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting a feel that learning EJB has so much different types of dimensions - container dependent behaviour, tools, persistence provider variations etc.

Learning wcd was straight forward!
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Niranjan,

Please keep in mind, the provider choices, extra feature sets and tools in the EJB layer are more diverse. There are really not that much to speak of beyond the spec as far as Servlets and JSPs are concerned. On the other hand, you will find that a more complex spec like JSF that is not a commodity technology also has a lot of stuff beyond what the basic spec offers.

I think this is a good sign, not something worrisome :-). That being said, it is possibly to just stick with the spec and use just a text editor, ANT and an Java EE 5 server. Indeed, that is what my co-author Debu Panda does!

Hope it helps,
Reza
 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic