Jump to: navigation, search

Difference between revisions of "EclipseLink/FAQ/JPA/PostgreSQL"

< EclipseLink‎ | FAQ‎ | JPA
(New page: [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL] is an open source databases using the BSD license. PostgreSQL originally evolved from the Ingres. Most JPA and EclipseLink functional...)
 
Line 5: Line 5:
 
Some common PostgresSQL issue are:
 
Some common PostgresSQL issue are:
 
* Native SQL meta-data returned as lower case : This means to use native SQL queries you may need to ensure your column names are specified as lower case in your mappings.  You can also use the EclipseLink persistence.xml property <code>"eclipselink.jdbc.uppercase-columns"="true"</code>, to force the meta-data columns to uppercase.
 
* Native SQL meta-data returned as lower case : This means to use native SQL queries you may need to ensure your column names are specified as lower case in your mappings.  You can also use the EclipseLink persistence.xml property <code>"eclipselink.jdbc.uppercase-columns"="true"</code>, to force the meta-data columns to uppercase.
* PostgreSQL seems to be more picky on parameter typing when using binding.  This can be an issue when binding <code>null</code> values in some cases.  Ensure you have the correct types set in your mappings such as setting the <code>type</code> of the mapping's <code>DatabaseField</code>.  You can also use dynamic SQL using the persistence.xml property <code>"eclipselink.jdbc.bind-parameters"="false"</code>
+
* PostgreSQL seems to be more picky on parameter typing when using binding.  This can be an issue when binding <code>null</code> values in some cases.  Ensure you have the correct types set in your mappings such as setting the <code>type</code> of the mapping's <code>DatabaseField</code>.  You can also use dynamic SQL using the persistence.xml property <code>"eclipselink.jdbc.bind-parameters"="false"</code>.
 +
* Postgres seems to abort the transaction if an error occurs, so accessing the database after a failure may not be possible until after calling <code>rollback</code>.

Revision as of 10:33, 13 January 2009

PostgreSQL is an open source databases using the BSD license. PostgreSQL originally evolved from the Ingres.

Most JPA and EclipseLink functionality should work with PostgreSQL.

Some common PostgresSQL issue are:

  • Native SQL meta-data returned as lower case : This means to use native SQL queries you may need to ensure your column names are specified as lower case in your mappings. You can also use the EclipseLink persistence.xml property "eclipselink.jdbc.uppercase-columns"="true", to force the meta-data columns to uppercase.
  • PostgreSQL seems to be more picky on parameter typing when using binding. This can be an issue when binding null values in some cases. Ensure you have the correct types set in your mappings such as setting the type of the mapping's DatabaseField. You can also use dynamic SQL using the persistence.xml property "eclipselink.jdbc.bind-parameters"="false".
  • Postgres seems to abort the transaction if an error occurs, so accessing the database after a failure may not be possible until after calling rollback.