The SQL code completion provided by IDEA 8.x is quite nice.
For example, completing "uCD" to "user_creation_date" column name makes
typing queries a pleasure.
The "Datasource" model created by IDEA includes primary key and foreign
key information for all tables. It seems it would be possible to make
SQL completion even more fluid.
Let's assume I'm writing a query that joins some tables:
from USER u, USER_DETAILS ud
where u.id = ud.]]>
Table USER_DETAILS (aliased to "ud") has a foreign key to table USER
(aliased to "u").
It would be a nice touch if smart completion (Ctrl-Shift-Space) would
use the table relation metadata to suggest matching the foreign key to
the primary key in this WHERE clause expression.