-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicate entity checks #1287
Conversation
persistent/Database/Persist/TH.hs
Outdated
newEnts = | ||
Set.toList $ | ||
Set.fromList allEnts | ||
Set.\\ Set.fromList (map unbindEntityDef preexistingEntities) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, sigh, alas, oh well, so silly,,,
mm no this is broken still looks like the code in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've got it fixed. Mostly by skipping the transformation from ModelNameId
to Key ModelName
if we're not in the mpsGeneric
mode.
Another bug from #1204 :\
@@ -28,7 +28,7 @@ import Database.Persist.TH.SharedPrimaryKeySpec (User, UserId) | |||
|
|||
mkPersistWith sqlSettings $(discoverEntities) [persistLowerCase| | |||
|
|||
Profile | |||
ProfileX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
persistent
now fails to generate code for Profile
because Profile
is already a table defined in discoverEntities
.
Before submitting your PR, check that you've:
@since
declarations to the Haddockstylish-haskell
on any changed files..editorconfig
file for details)After submitting your PR:
(unreleased)
on the ChangelogCloses #1288