So the fix in #1255 isn't quite enough. The tests in #1287 document the issue.
With the following format:
module A where
mkPersist sqlSettings [persistLowerCase|
A
name Text
|]
module B where
import A
mkPersistWith sqlSettings $(discoverEntities) [persistLowerCase|
B
a AId
|]
module C where
import B
mkPersistWith sqlSettings $(discoverEntities) [persistLowerCase|
C
b BId
|]
You'll get duplicate name errors because the mkPersistWith in C is trying to make models for A. A is not available for lookupTypeName, but it is still present in the input entity list.
Seems like it should be straightforward to just not generate things from the input list??
So the fix in #1255 isn't quite enough. The tests in #1287 document the issue.
With the following format:
You'll get duplicate name errors because the
mkPersistWithinCis trying to make models forA.Ais not available forlookupTypeName, but it is still present in the input entity list.Seems like it should be straightforward to just not generate things from the input list??