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.