You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type SlimAlbum struct {
ID uint32 `sql:"primary_key"`
ParentID *uint32
CoverUUID *string // UUID of the picture used as album cover
CreatedAt time.Time
}
type Picture struct {
ID uint32 `sql:"primary_key"`
UUID string // UUID v4 format
AlbumID uint32
CreatedAt time.Time
Album SlimAlbum `alias:"PictureAlbum"`
}
SELECT picture.id AS "picture.id",
picture.uuid AS "picture.uuid",
picture.album_id AS "picture.album_id",
picture.created_at AS "picture.created_at",
`PictureAlbum`.id AS "PictureAlbum.id",
`PictureAlbum`.parent_id AS "PictureAlbum.parent_id",
`PictureAlbum`.cover_uuid AS "PictureAlbum.cover_uuid",
`PictureAlbum`.created_at AS "PictureAlbum.created_at"
FROM `database`.picture
INNER JOIN `database`.album AS `PictureAlbum` ON (picture.album_id = `PictureAlbum`.id)
WHERE picture.uuid = '7b7f76c4-b72d-4bab-808f-5fe6fdd538c7';
When I run the test case against a database with a complete row I would expect all data to be returned. However, all data is returned except for the cover_uuid (which is non null in the database)
also when I run the debug sql, it returns the data as expected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My slim downed data structs:
my code to retrieve the data:
the debug sql:
When I run the test case against a database with a complete row I would expect all data to be returned. However, all data is returned except for the cover_uuid (which is non null in the database)
also when I run the debug sql, it returns the data as expected.
Beta Was this translation helpful? Give feedback.
All reactions