-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incrementally improve Omeka_Record docs
- explicitly mention mandatory ID column - fix a bunch of incorrect names and formatting - slightly flesh out info on DB tables and installing - add sections (fix #45)
- Loading branch information
1 parent
b5dcc4d
commit e9d5d83
Showing
1 changed file
with
45 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e9d5d83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the 'id' field actually have to be the primary key though? Isn't it enough for it to be an index and auto-increment?
I created my junction table with the primary key made by the two "foreign" keys, and the redundant 'id' column being just auto-increment and index, and so far I haven't had issues.
Comments in the source code, I seem to remember, said something like "preferably the primary key" or something like that.
e9d5d83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ORM doesn't know the difference between... really anything that's going on on the database side of things, it just bakes in assumptions about what columns will exist and how they (
id
in particular) behave. In the context of the documentation I think it's clearer to just say "it's the primary key" vs. "it's an auto-incrementing unique key, usually the primary key".Technically even auto-incrementing need not be necessary if you're careful about assigning IDs "correctly" but it's really not something we'd want to be drawing attention to.