protected $attributeNames = 'id title author code summary editor media collection isbn readBy cover category date code3 code3Long genre genreCode coverdisplay link linkTitle typeMedia1';
protected $attributeNames = 'id title author code summary editor media collection isbn readBy reader cover category date code3 code3Long genre genreCode coverdisplay link linkTitle mediaType typeMedia1';
public static function find($id) {
public static function find($id) {
return self::findBy('NoticeID', $id);
return self::findBy('NoticeID', $id);
@ -86,7 +86,8 @@ class AudioBook extends DbMapping
Fields.[300] AS media,
Fields.[300] AS media,
Fields.[490a] AS collection,
Fields.[490a] AS collection,
isbn.DisplayText AS isbn,
isbn.DisplayText AS isbn,
Fields.[901] AS readBy,
Fields.[901] AS reader,
Fields.[901] AS readBy, -- for compatibility
Fields.[899a] AS cover,
Fields.[899a] AS cover,
'' AS category, -- supposed to come from tags 600, 610, 650, 651, 655, 690, 691, 695, 696 but always empty anyway
'' AS category, -- supposed to come from tags 600, 610, 650, 651, 655, 690, 691, 695, 696 but always empty anyway
CONVERT(VARCHAR, Notices.[CreationDate], 102) AS date,
CONVERT(VARCHAR, Notices.[CreationDate], 102) AS date,
@ -97,7 +98,8 @@ class AudioBook extends DbMapping
Notices.[coverdisplay],
Notices.[coverdisplay],
Fields.[856u] AS link,
Fields.[856u] AS link,
Fields.[856z] AS linkTitle,
Fields.[856z] AS linkTitle,
Notices.[MediaType1Code] AS typeMedia1
Notices.[MediaType1Code] AS mediaType,
Notices.[MediaType1Code] AS typeMedia1 -- for compatibility
FROM Notices
FROM Notices
INNER JOIN Codes AS Code3 ON Notices.userdefined3code = Code3.Code AND Code3.Type=6
INNER JOIN Codes AS Code3 ON Notices.userdefined3code = Code3.Code AND Code3.Type=6
INNER JOIN Codes AS GenreCode ON MediaType2Code = GenreCode.Code AND GenreCode.Type = 2
INNER JOIN Codes AS GenreCode ON MediaType2Code = GenreCode.Code AND GenreCode.Type = 2