sqljpacode-generationentity-bean

Are there any modeling tools that can visually generate jpa or sql queries?


Does anyone know of a tool like PowerArchitect or SquirrelSQL or maybe eclipse plugin that lets you also generate jpa/sql queries?

Imagine you choosing your database, or your entity beans, and the modeling would reverse engineer your database/entity model, so that you could visually just choose the columns you wanted to select, and it would generate jpa or sql queries for you.

For instance choosing A.b and X.y would generate something like this:

select a.b, x.y from A a, X x join ......

Solution

  • Eclipse (more precisely the Data Tools Platform Project) has a SQL Query Builder built-in. Open a SQL Scrapbook, right-click in it and select Edit in SQL Query Builder:

    alt text http://img140.imageshack.us/img140/2872/screenshot003xm.png

    This will open the SQL Query Builder:

    alt text http://img532.imageshack.us/img532/5943/screenshot004c.png

    Then add tables, conditions, etc. There is a Webinar showing it in action.


    MyEclipse also has a Visual SQL Query Builder. And I'm pretty sure other standalone universal clients support this visual query builder too.


    For JPA, I'm not aware of any visual builder in Dali. This has been mentioned in the past but I have no idea of the exact status (I don't use Dali actually). However, this article mentions a Visual JPQL query builder in IBM Rational Application Developer.