For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2005 > DB_DataObjects - Long Column Names









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DB_DataObjects - Long Column Names
Barry Steele

2005-06-04, 3:58 am


Hi,
We have just come across a very bemusing issue with DataObjects.

We have table with a column whose name is 32 characters long (don't ask why).

in our development environment this works just fine, but when we moved
into pre-production testing (on the target box) we noticed the the query
that was generated has the last 3 characters chopped off. THe attribute
name in the object remained correct, but of course never gets set the
column name is something like 'InternalMembershipCategoryTypeID'.

As soon as we shortened the attribute name it works - on both platforms.
Both platforms are using DataObjects 1.7.1.

I have not as yet had time to look at the DBO code, but I thought that
this might be of interest to other folks.

--
Stay happy, stay well ... get involved
Barry Steele
www.hpfm.com.au
mob: +61 413 947980
off: +61 2 99816329
fax: +61 2 9981 7806
Alan Knowles

2005-06-05, 3:57 pm

can you check the versions of DB/PHP.. - it may be a compatibility rule
or something.

DataObjects as far as I remember doesnt do anything with lengths of
columns.

Regards
Alan


On Sat, 2005-06-04 at 14:22 +1000, "Barry Steele" wrote:
> Hi,
> We have just come across a very bemusing issue with DataObjects.
>
> We have table with a column whose name is 32 characters long (don't ask why).
>
> in our development environment this works just fine, but when we moved
> into pre-production testing (on the target box) we noticed the the query
> that was generated has the last 3 characters chopped off. THe attribute
> name in the object remained correct, but of course never gets set the
> column name is something like 'InternalMembershipCategoryTypeID'.
>
> As soon as we shortened the attribute name it works - on both platforms.
> Both platforms are using DataObjects 1.7.1.
>
> I have not as yet had time to look at the DBO code, but I thought that
> this might be of interest to other folks.
>

Alan Knowles

2005-06-05, 3:57 pm

can you check the versions of DB/PHP.. - it may be a compatibility rule
or something.

DataObjects as far as I remember doesnt do anything with lengths of
columns.

Regards
Alan


On Sat, 2005-06-04 at 14:22 +1000, "Barry Steele" wrote:
> Hi,
> We have just come across a very bemusing issue with DataObjects.
>
> We have table with a column whose name is 32 characters long (don't ask why).
>
> in our development environment this works just fine, but when we moved
> into pre-production testing (on the target box) we noticed the the query
> that was generated has the last 3 characters chopped off. THe attribute
> name in the object remained correct, but of course never gets set the
> column name is something like 'InternalMembershipCategoryTypeID'.
>
> As soon as we shortened the attribute name it works - on both platforms.
> Both platforms are using DataObjects 1.7.1.
>
> I have not as yet had time to look at the DBO code, but I thought that
> this might be of interest to other folks.
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com