Justin Carlson | 8 Jul 2009 22:58
Picon

Building objects from schema, error when encountering TEXT column.

Hoping someone can take a look at this:

CreoleTypes::getCreoleCode('LONGVARCHAR'); returns null

So when I try to build, PHP5BasicObjectBuilder.php does:

$affix = CreoleTypes::getAffix(CreoleTypes::getCreoleCode($col->getType()),$col);

which throws an exception, saying the affix type wasn't found, (it's null)

If I remove self::TEXT => 'TEXT', from  protected static
$creoleTypeMap = array() it works.

This is of course because:

const TEXT = 17;
const LONGVARCHAR = 17;

These both have an index of 17, so creoleTypeMap does not contain both.

The column from my schema.xml is:

    <column name="user_answer" type="LONGVARCHAR">
      <vendor type="mysql">
        <parameter name="Field" value="user_answer"/>
        <parameter name="Type" value="text"/>
        <parameter name="Null" value="YES"/>
        <parameter name="Key" value=""/>
        <parameter name="Default" value=""/>
        <parameter name="Extra" value=""/>
(Continue reading)

webpost | 9 Jul 2009 00:25
Picon

RE: Building objects from schema, error when encountering TEXT column.

I didn't get a copy to reply to, so I'm doing it on the web. 

It seems PHP 5.3 is the cause:
http://bugs.php.net/bug.php?id=48858

Thanks,
Justin

------------------------------------------------------
http://propel.tigris.org/ds/viewMessage.do?dsForumId=1097&dsMessageId=2369172

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> propel.tigris.org].


Gmane