diff --git a/src/Database/Persist/Local/Class/PersistEntityGraph.hs b/src/Database/Persist/Local/Class/PersistEntityGraph.hs index 148f0fe..6f4bd81 100644 --- a/src/Database/Persist/Local/Class/PersistEntityGraph.hs +++ b/src/Database/Persist/Local/Class/PersistEntityGraph.hs @@ -23,6 +23,7 @@ import Prelude import Database.Persist class (PersistEntity n, PersistEntity e) => PersistEntityGraph n e where + type PersistEntityGraphSelector n e sourceParam :: e -> Key n sourceField :: EntityField e (Key n) destParam :: e -> Key n diff --git a/src/Vervis/Model.hs b/src/Vervis/Model.hs index b86e9da..63467f0 100644 --- a/src/Vervis/Model.hs +++ b/src/Vervis/Model.hs @@ -56,6 +56,7 @@ instance Hashable ProjectRoleId where hash = hash . fromSqlKey instance PersistEntityGraph Ticket TicketDependency where + type PersistEntityGraphSelector Ticket TicketDependency = ProjectId sourceParam = ticketDependencyParent sourceField = TicketDependencyParent destParam = ticketDependencyChild