[PHP]SPOD : Relation on a multiple key table

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PHP]SPOD : Relation on a multiple key table

l.potherat
Hi,

In my multilanguage project, I would like to make a relation between an Article and its derivations by language.

I have a table "article" and a table "article_lang". The key of "article" is "id_art" and the key of "article_lang" is "id_art,id_lang".

When I request SPOD to make the relation, it seems impossible to do so on multiple key tables ... Is there a way to do this or not ? Is this feature planned in the future ?

Thanks,

Leonard


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: [PHP]SPOD : Relation on a multiple key table

Nicolas Cannasse
Léonard P. a écrit :

> Hi,
>
> In my multilanguage project, I would like to make a relation between an
> Article and its derivations by language.
>
> I have a table "article" and a table "article_lang". The key of
> "article" is "id_art" and the key of "article_lang" is "id_art,id_lang".
>
> When I request SPOD to make the relation, it seems impossible to do so
> on multiple key tables ... Is there a way to do this or not ? Is this
> feature planned in the future ?

No, it's not planned. Not sure it's considered a good practice to do so
anyway ;) You can instead have an unique index on [id_art,id_lang] and a
classic auto_increment key instead.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: [PHP]SPOD : Relation on a multiple key table

l.potherat
Nicolas Cannasse a écrit :

> Léonard P. a écrit :
>> Hi,
>>
>> In my multilanguage project, I would like to make a relation between
>> an Article and its derivations by language.
>>
>> I have a table "article" and a table "article_lang". The key of
>> "article" is "id_art" and the key of "article_lang" is "id_art,id_lang".
>>
>> When I request SPOD to make the relation, it seems impossible to do
>> so on multiple key tables ... Is there a way to do this or not ? Is
>> this feature planned in the future ?
>
> No, it's not planned. Not sure it's considered a good practice to do
> so anyway ;) You can instead have an unique index on [id_art,id_lang]
> and a classic auto_increment key instead.
>
> Best,
> Nicolas
Thanks for the answer,
Then I will map my relation by my own methods ;)

Leonard,


--
haXe - an open source web programming language
http://haxe.org