I was getting the following error:
ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
on line:
<property name="customer" column="CustomerId" />
the fix for above error was to use many-to-many tag instead of plain <property>:
<many-to-one name="customer" column="CustomerId" />
Note that class is not required here – it’s computed from return type of getCustomer() getter by reflection.

When you are joining to an existing project you don’t have good knowledge of internal project structures. Existing documentation may be inaccurate or just missing. In this case you can rely only on clean source code structure and source code comments. Based on them you can generate API docs using Javadoc or Pydoc for instance. But what with persistent data model stored in database? SchemaSpy comes with help here!
SchemaSpy is small (~200kB) Java application that is able to render schema retrieved from JDBC connection into set of “hyperlinked” HTML pages with Java Script and (if GraphViz installed) diagrams. Below you see one page of example output of this tool:

(more…)
A very useful feature introduced lately in Eclipse IDE is presentation of current environment heap size. You can check how your Eclipse usage changes memory used and this way you can optimize some processes. Monitor sits in right bottom corner of main window and additionally you have the possibility to manually run garbage collector (trash icon):

You can enable it on General Preference page:

By default Oracle is cryptic about details of an error. Directive SHOW ERRORS is very useful during debugging of stored procedures for instance.
Eclipse SQL Explorer is simple but powerfull tool to inspect Your database state. You can:
- exec SQL commands
- browse database objects in Eclipse (including existing indices)
- open multiple databases at once
Installation is pretty simple:
- Download preferred version (select any sqlexplorer_plugin-*.zip file)
- Unpack this ZIP to your Eclipse directory: unzip sqlexplorer_plugin-*.zip
- Restart Eclipse
Usage: switch to SQLExplorer perspective and define new connection:

(more…)