-
Notifications
You must be signed in to change notification settings - Fork 302
ID fields can sometimes be generated with ForeignRefs #1615
Open
Description
For example:
ExplicitPrimaryKey sql=explicit_primary_key
Id Text
produces an EntityDef of
EntityDef { entityHaskell = EntityNameHS{unEntityNameHS = "ExplicitPrimaryKey"} , entityDB = EntityNameDB{unEntityNameDB = "explicit_primary_key"} , entityId = EntityIdField ( FieldDef { fieldHaskell = FieldNameHS{unFieldNameHS = "Id"} , fieldDB = FieldNameDB{unFieldNameDB = "id"} , fieldType = FTTypeCon Nothing "Text" , fieldSqlType = SqlString , fieldAttrs = [FieldAttrOther "Text"] , fieldStrict = False , fieldReference = ForeignRef (EntityNameHS{unEntityNameHS = "ExplicitPrimaryKey"}) , fieldCascade = FieldCascade{fcOnUpdate = Nothing, fcOnDelete = Nothing} , fieldComments = Nothing , fieldGenerated = Nothing , fieldIsImplicitIdColumn = True } ) , [...] }
I would expect fieldReference = NoReference here - it doesn't really make sense for an entity's ID field to be a reference to itself.
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.