Hi Mike,
A simple solution is to extend the JDBCPlugin and implement the method
newPrimaryKeySelectString to return a SELECT statement without the FOR
UPDATE clause. Below is the implementation we did.
Cheers,
Henrique
/**
* The statement for selecting the primary key for a given entity. This
* implementation differs from the original by not adding the FOR UPDATE
* string at the end of the SELECT statement.
*
*..ee
com.webobjects.jdbcadaptor.JDBCPlugIn#newPrimaryKeySelectString(java.lang.String,java.lang.String)
*/
@Override
public String newPrimaryKeySelectString( String eoPkTable, String
tableName )
{
StringBuffer buffer = new StringBuffer( 128 );
buffer.append( "SELECT PK FROM " );
buffer.append( eoPkTable );
buffer.append( " WHERE NAME = '" );
buffer.append( tableName );
buffer.append( "'" );
return buffer.toString();
}
Cornelius Jaeger wrote:
> hiya
>
> anders bjroklund worked on this, search for his name in the list archives.
> the main problem is the lack of SELECT FOR UPDATE in hsqldb.
> my model depended on primary keys being visible to the app at the time,
> which caused some havoc as well.
> i haven't tried using the plugin in a while, but if your model isn't
> super complex it will work fine.
> af..lgonet.se
>
> hth
>
> cornelius
>
>
>
> On 26.02.2008, at 16:38, mike deavila wrote:
>
>> hi All,
>>
>> I'm trying to use HSQL DB and without a plugin EOF does not know how
>> to handle the PK generation and insert data. Has someone else faced
>> this issues, how did you solve it? Does anyone know the where abouts
>> of a HSQL DB EOF plugin?
>>
>> thanks
>> mike
>
>
This archive was generated by hypermail 2.0.0 : Wed Feb 27 2008 - 12:36:35 EST