You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Landry Soules <ca...@gmail.com> on 2006/12/06 23:19:42 UTC

Problem with DB schema generation

Hello,

I used CayenneModeler to design my tables and classes and would like to 
generate the corresponding SQL, to update my MySQL database. But 
unfortunately, the "create FK support" option doesn't make any 
difference, and no foreign key sql statement is generated.
Here is an example of a relation i want to appear in my DB :
    <db-relationship name="toCountry" source="address" target="country" 
toMany="false">
        <db-attribute-pair source="country" target="id"/>
    </db-relationship>
    <db-relationship name="toState" source="address" target="state" 
toMany="false">
        <db-attribute-pair source="state" target="id"/>
    </db-relationship>

Thank you for your help.

Re: Problem with DB schema generation

Posted by Andrus Adamchik <an...@objectstyle.org>.
I emailed Apache infrastructure list. Hopefully it will be back up soon.

Andrus


On Dec 7, 2006, at 11:40 PM, Landry Soules wrote:

> OK, i will but for the moment the link is not accessible...
>
> Andrus Adamchik a écrit :
>> This is a bug - Modeler still thinks that MySQL doesn't supports  
>> FK constraints, just like in the old days... Could you please open  
>> a bug report?
>>
>> http://issues.apache.org/cayenne/
>>
>> Andrus
>>
>> On Dec 7, 2006, at 12:19 AM, Landry Soules wrote:
>>
>>> Hello,
>>>
>>> I used CayenneModeler to design my tables and classes and would  
>>> like to generate the corresponding SQL, to update my MySQL  
>>> database. But unfortunately, the "create FK support" option  
>>> doesn't make any difference, and no foreign key sql statement is  
>>> generated.
>>> Here is an example of a relation i want to appear in my DB :
>>>    <db-relationship name="toCountry" source="address"  
>>> target="country" toMany="false">
>>>        <db-attribute-pair source="country" target="id"/>
>>>    </db-relationship>
>>>    <db-relationship name="toState" source="address"  
>>> target="state" toMany="false">
>>>        <db-attribute-pair source="state" target="id"/>
>>>    </db-relationship>
>>>
>>> Thank you for your help.
>>>
>>
>>
>
>


Re: Problem with DB schema generation

Posted by Landry Soules <ca...@gmail.com>.
OK, i will but for the moment the link is not accessible...

Andrus Adamchik a écrit :
> This is a bug - Modeler still thinks that MySQL doesn't supports FK 
> constraints, just like in the old days... Could you please open a bug 
> report?
>
> http://issues.apache.org/cayenne/
>
> Andrus
>
> On Dec 7, 2006, at 12:19 AM, Landry Soules wrote:
>
>> Hello,
>>
>> I used CayenneModeler to design my tables and classes and would like 
>> to generate the corresponding SQL, to update my MySQL database. But 
>> unfortunately, the "create FK support" option doesn't make any 
>> difference, and no foreign key sql statement is generated.
>> Here is an example of a relation i want to appear in my DB :
>>    <db-relationship name="toCountry" source="address" 
>> target="country" toMany="false">
>>        <db-attribute-pair source="country" target="id"/>
>>    </db-relationship>
>>    <db-relationship name="toState" source="address" target="state" 
>> toMany="false">
>>        <db-attribute-pair source="state" target="id"/>
>>    </db-relationship>
>>
>> Thank you for your help.
>>
>
>


Re: Problem with DB schema generation

Posted by Andrus Adamchik <an...@objectstyle.org>.
This is a bug - Modeler still thinks that MySQL doesn't supports FK  
constraints, just like in the old days... Could you please open a bug  
report?

http://issues.apache.org/cayenne/

Andrus

On Dec 7, 2006, at 12:19 AM, Landry Soules wrote:

> Hello,
>
> I used CayenneModeler to design my tables and classes and would  
> like to generate the corresponding SQL, to update my MySQL  
> database. But unfortunately, the "create FK support" option doesn't  
> make any difference, and no foreign key sql statement is generated.
> Here is an example of a relation i want to appear in my DB :
>    <db-relationship name="toCountry" source="address"  
> target="country" toMany="false">
>        <db-attribute-pair source="country" target="id"/>
>    </db-relationship>
>    <db-relationship name="toState" source="address" target="state"  
> toMany="false">
>        <db-attribute-pair source="state" target="id"/>
>    </db-relationship>
>
> Thank you for your help.
>