Hi Andrus,
thanks for your information about the maxlength filed
I'm using postgresql 7.2 under cygwin for development, the application
will then be deployed under linux
jdbc-driver: JDBC2 from http://jdbc.postgresql.org/download.html
perhaps I will try, if i have time the JDBC3 (jdk 1.4 only) driver
Andrus Adamchik wrote:
> Hi Martin,
> Let me jump in on that.
> martin ruff writes:
>
>> Hi Craig,
>> I FOUND the mistake !!!!
>> it was a proplem in the datamap:
>> all other object entities have a primary key definition:
>> (I got those by reverse engineering the database)
>> id integer PK mandatory maxlength 4
>> projects had:
>> id numeric PK mandatory
>> now I changed it to:
>> id integer PK mandatory maxlength 4
>> and now it works:
>> (Projects)theDataContext.registeredObject(new ObjectId(Projects.class,
>> "id",projectsID.intValue()));
>> now returns me a correct Projects object
>
>
> Hmm, strange. What database are you using (you may have mentioned this
> before, I just can't find the relevant post now)? May be a bug either in
> Cayenne or in the JDBC driver....
>
>> one question:
>> maxlength, does this mean 4 digits?
>
>
> "4" is the length of the column in bytes as reported by the database.
> This is not the number of decimal digits.
>
>> and if so, how is this enforced?
>> cause I have entries with id's > 9999 ?
>> for example in the auto_pk_support table for reportingdates the next
>> id is 10100
>
>
> It is not enforced by Cayenne. The only place where this is used now is
> in forward engineering - generating the tabels from the DataMap.
> Andrus
This archive was generated by hypermail 2.0.0 : Sat Dec 14 2002 - 10:47:46 EST