News for hackers. Stuff that matters.
Re:PHP is the new JavaScript? by SoftTalker on Friday September 06, 2024 @04:54PM (#41469646)
"the ORM didn't support composite keys"

Well composite keys are a bad idea, so maybe it had a reason for that.

Re:PHP is the new JavaScript? by wvenable on Friday September 06, 2024 @05:37PM (#41469909)
Composite keys are fine as long as all the key columns are surrogate keys.
Re:PHP is the new JavaScript? by SoftTalker on Friday September 06, 2024 @10:42PM (#41471156)
High bridges without guardrails are fine as long as you don't fall off.
Re:PHP is the new JavaScript? by wvenable on Friday September 06, 2024 @11:02PM (#41471212)
Using composite keys can help prevent you from representing invalid states in the database or in your application. They can be guardrails.
Re:PHP is the new JavaScript? by TOGoS on Friday September 06, 2024 @05:47PM (#41469960)
If an ORM can't be used to access a valid database, then that ORM sucks. (ORMs often suck for additional reasons, but that one's pretty hard to ignore if you have an existing database that you need to interact with.)

There are perfectly valid uses for composite keys. In a table that indicates a relationship between multiple other objects, for example.