share [mkPersist sqlSettings { mpsGenerateLenses = True, mpsPrefixFields = False }, mkMigrate "migrateAll"] [persistLowerCase|
Account
accountNo Text
accountType AccountType
accountHolderName Text
accountOpenDate UTCTime default=CURRENT_TIME
accountCloseDate UTCTime Maybe default=NULL
currentBalance MoneyUSD
rateOfInterest Double
Primary accountNo
deriving Show
|]
I am getting this compilation error ..
• No instance for (Generic (Key Account))
arising from the 'deriving' clause of a data type declaration
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (aeson-1.4.6.0:Data.Aeson.Types.ToJSON.ToJSON
(Key Account))
|
40 | share [mkPersist sqlSettings { mpsGenerateLenses = True, mpsPrefixFields = False }, mkMigrate "migrateAll"] [persistLowerCase|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
and another exactly similar for FromJSON
What exactly is going wrong here ? I am not using json in the above definition.
regards.
--