Yii Framework Forum: Primary composite key - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Primary composite key Rate Topic: -----

#1 User is offline   Big O 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 07-October 10

Posted 13 November 2010 - 08:00 PM

Hi,

I have a table which has a composite primary key.
as its already know that CRUD gen doesn't work with composite primary keys.

could someone pls suggest how the model code should look like if it would have
supported primary composite key...?

suppose table name is A and key are Bid, Cid
PRIMARY KEY (`Bid`, Cid),
These 2 are foreign key from table B and C respectively

How should Relations method look like...?

-Big O
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 13 November 2010 - 09:23 PM

You seem to be consistently posting the the wrong forum. :)

This forum is about:

Quote

Discuss anything not related to development here.


Could you perhaps consider posting in the framework discussions forum?
Maybe the general discussion for Yii 1.1.x ?

Quote

This is for general discussion about Yii 1.1.x releases. Ask your questions here.


Sorry, but I just couldn't help myself. ;)
"Less noise - more signal"
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users