Project

General

Profile

Dbo and "version" field

Added by Michael Wagner over 13 years ago

Hi Koen,

I am using the latest wt version from git.

I customized my mapping, configured a composite primary key and disabled the "version" field by overriding the "versionField" method and returning 0. That does correctly remove the "and version = ?" part from the SQL statement. However, wt still binds the "version" parameter to the SQL statement resulting in a Postgres error as follows:

ERROR: bind message supplies 3 parameters, but prepared statement "SQL0x174f0f066334873" requires 2

STATEMENT: delete from "triplei_schema"."map" where "id" = $1 and "idMandator" = $2

In my case the primary key is a composite one (id + idMandator) and the pure DELETE statement is created correctly by wt. Only a third parameter (version) should not be bound.

My workaround for the moment is to add the "version" column to my table again and enable the "version" field.

Support for a composite primary key works fine and that helps me a lot already.

Many thanks,

Michael


Replies (1)

RE: Dbo and "version" field - Added by Koen Deforche over 13 years ago

Hey Michael,

Oops. Fixed in latest git.

Regards,

koen

    (1-1/1)