Re: ternary and binary relationships together
Hy Joaquín! The base of my datamodel was wrong :( I wrote: I have three models (entities): A, B and C , but either of them is not an entity, only an attribute! When I was seeing the repeated values in the same field of different records, I sed: Let's normalize it! and I made a new entity, but it was a trouble. The whole problem has simplified radically, and I got two basic tables, and a binary habtm relationship. These are all: A and B, A_B --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ternary and binary relationships together
On Jan 22, 1:49 am, pipi69e5 [EMAIL PROTECTED] wrote: Hi, I'm new in cakePHP (and in database modeling (and in english:) too)! I have three models (entities): A, B and C. A hasAndBelongsToMany B, A hasAndBelongsToMany C and B hasAndBelongsToMany C All of this join-tables has own attributes and I have a biggest ABC join table with own attributes too. So I have A, B, C, A_B, A_C, B_C and A_B_C tables (and models). I can create the table A_B_C in different ways: A_B_C (id, A_B_id, C_id), A_B_C (id, A_C_id, B_id), A_B_C (id, A_id, B_C_id) and finally A_B_C (id, A_id, B_id, C_id). When I create a HABTM relationship in the models A, B or C, there is an associationForeignKey key in the $hasAndBelongsToMany array type variable, but only one. The last A_B_C possibility (A_B_C (id, A_id, B_id, C_id)) has more then one associationForeignKey, so I can't use it (really?). Then I have yet three possibilities: A_B_id and C_id, A_C_id and B_id or B_C_id and A_id. Why the either of them, not the other? Sorry about my english Your A is fine, the B and C are a bit difficult to understand. Where: A = your english B = your explenation C = your problem. Try using real/tangible names. AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ternary and binary relationships together
Hy AD! A little bit of thinking and the problem are working out :) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ternary and binary relationships together
hey pipe69e5 could you explain how did you do? On Jan 23, 6:22 am, pipi69e5 [EMAIL PROTECTED] wrote: Hy AD! A little bit of thinking and the problem are working out :) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---