Your Question

can i use association feature without create foreignkey? eg: Auto Create/UpdateEager Loading

The document you expected this should be explained

most of time we don't explicity create foreignkey, for convenient

Expected answer

Comment From: MarsonShine

sorry, i use wrong template

Comment From: MarsonShine

someone reply that?

Comment From: a631807682

https://gorm.io/docs/gorm_config.html#DisableForeignKeyConstraintWhenMigrating

Comment From: MarsonShine

https://gorm.io/docs/gorm_config.html#DisableForeignKeyConstraintWhenMigrating

no,this question not for migration. i want to use this feature: https://gorm.io/docs/preload.html without foreignkey

Comment From: a631807682

You defined the relationship and then you can use it without actually creating the foreign key

Comment From: MarsonShine

thanks,i'll try it