bake
bake copied to clipboard
Primary key excluded from $_accessible array for has many relationship tables
Description
If you have a table such as day_events
which has day_id
and created_at
as the primary key, these columns are excluded from the generated $_accessible array in the Entity.
The created_at
column will also be missing from the validator config in the Table.
Bake Version
2.7.0
PHP Version
No response
This seems to expect the primary key to be generated. However, for multi-column keys, that's probably not true.
Users can work around it by removing the primary key and introducing the individual constraints they represent.
@othercorey Hi, so your suggestion would be adding both columns to $_accessible for multi-column primary key?
@othercorey Hi, so your suggestion would be adding both columns to $_accessible for multi-column primary key?
Yes. For a complete solution, we should decide if a primary key could be autogenerated or not.
This issue is stale because it has been open for 120 days with no activity. Remove the stale
label or comment or this will be closed in 15 days