gormfixes

package
v0.4.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePeggedAssocFields

func CreatePeggedAssocFields(db *gorm.DB, modelObj models.IModel) (err error)

CreatePeggedAssocFields :-

func DeleteModelFixManyToManyAndPeg added in v0.4.5

func DeleteModelFixManyToManyAndPeg(db *gorm.DB, modelObj models.IModel) error

DeleteModelFixManyToManyAndPeg remove nested field if it has tag \"betterrest="peg"\" Pegassoc is no problem, because we never tried to take care of it If necessary, DB foreign key constraint will do the job

func FixManyToMany

func FixManyToMany(correctModel models.IModel, incorrectModel models.IModel) (err error)

FixManyToMany :-

func LoadManyToManyBecauseGormFailsWithID

func LoadManyToManyBecauseGormFailsWithID(db *gorm.DB, modelObj models.IModel) error

LoadManyToManyBecauseGormFailsWithID :-

func UpdatePeggedFields

func UpdatePeggedFields(db *gorm.DB, oldModelObj models.IModel, newModelObj models.IModel) (err error)

UpdatePeggedFields check if stuff in the pegged array is actually

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL