mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Remove primary key ContributorId
`Ebook` to `Contributor` is one to many, and we don't query by ContributorId. The table already has a SortOrder column, and we use that to order the queries.
This commit is contained in:
parent
1076c9a77d
commit
3f3cf702b2
3 changed files with 4 additions and 9 deletions
|
@ -210,7 +210,7 @@ class Ebook{
|
|||
from Contributors
|
||||
where EbookId = ?
|
||||
and MarcRole = ?
|
||||
order by ContributorId
|
||||
order by SortOrder asc
|
||||
', [$this->EbookId, 'aut'], Contributor::class);
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ class Ebook{
|
|||
from Contributors
|
||||
where EbookId = ?
|
||||
and MarcRole = ?
|
||||
order by ContributorId
|
||||
order by SortOrder asc
|
||||
', [$this->EbookId, 'ill'], Contributor::class);
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ class Ebook{
|
|||
from Contributors
|
||||
where EbookId = ?
|
||||
and MarcRole = ?
|
||||
order by ContributorId
|
||||
order by SortOrder asc
|
||||
', [$this->EbookId, 'trl'], Contributor::class);
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ class Ebook{
|
|||
from Contributors
|
||||
where EbookId = ?
|
||||
and MarcRole = ?
|
||||
order by ContributorId
|
||||
order by SortOrder asc
|
||||
', [$this->EbookId, 'ctb'], Contributor::class);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue