-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Milestone
Description
Suppose you have the following modules:
-- Schema/Foo.hs
module Schema.Foo where
mkPersist $(persistFileWith "foo.persistentmodels")
-- foo.persistentmodels
Foo
name Text
Primary name
-- Schema/Bar.hs
module Schema.Bar where
import Schema.Foo
mkPersist $(persistFileWith "bar.persistentmodels")
-- bar.persistentmodels
Bar
foo Text
Foreign Foo fk_bar_to_foo fooThis code will currently fail, because the HaskellName "Foo" is not present in the EmbedEntityMap, because it was not parsed from the same block of text.
I think there needs to be some way to lookup the entity without requiring it be present in the map. Attempting to call entityDef (Nothing :: Maybe $(Foo)) instead of relying on what's in the Map might work.
korayal
Metadata
Metadata
Assignees
Labels
No labels