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 (
These 2 are foreign key from table B and C respectively
How should Relations method look like…?
-Big O [/size][/color]
There has been some discussion past about composite primary key. If I remember well, in all topics the solution proposed and applied was to change the database stricuture like that:
Create a new primary key, autoincrement not to show to the user.
For the ex composite primary key, I created an index unique for have the database check for prevent duplication.
Changing the structure like that solves you lot of problem.
That is an advice for solve your problem immedialy and move forward. Anyway, the fact that we always done like that doesn’t mean that it is the best solution, so if anyone has a better idea, let’s share for major glory of the framowork.