THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline

#1 bug after generate module

(01-06-2014 16:37:43)


I've created schema with foreign-key to Product Model

<table name="product_comment" >
    <column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
    <column name="product_id" required="true" type="INTEGER" />
    <index name="idx_comment_product_id">
        <index-column name="product_id" />
    </index>
    <foreign-key foreignTable="product" onDelete="cascade">
        <reference local="product_id" foreign="id"/>
    </foreign-key>
    <column name="active" required="false" size="1" type="boolean" />
    <column name="description" required="true" type="CLOB" />
    <column name="signature" required="true" size="100" type="VARCHAR" />
    <column name="grade" required="true" size="1" type="INTEGER" />
    <behavior name="timestampable" />
</table>

I took the generate models command, but this command generate models with an error.
My new base model query in:

/local/modules/ProductComment/Model/BaseProductCommentQuery.php

got this line of code:

use ProductComment\Model\Thelia\Model\Product;

but the correct path is:

use Thelia\Model\Product;

I've noticed that this happend every time I use the base models.

  • manu
  • faï tot petar miladiu

Offline


Hello,

Yes this a bug in propel, we have to investigate how to resolve it and submit a patch to the propel team.

Thanks


http://doc.thelia.net/
http://thelia.net/modules
http://raynaud.io
PGP public Key : 0xC6E546A6