@@ -102,6 +102,7 @@ func main() {
102102 rootCmd .PersistentFlags ().BoolP ("no-driver-templates" , "" , false , "Disable parsing of templates defined by the database driver" )
103103 rootCmd .PersistentFlags ().BoolP ("no-back-referencing" , "" , false , "Disable back referencing in the loaded relationship structs" )
104104 rootCmd .PersistentFlags ().BoolP ("no-schema" , "" , false , "Disable generating a schema in the output" )
105+ rootCmd .PersistentFlags ().BoolP ("no-relation-getters" , "" , false , "Disable generating getters for relationship tables" )
105106 rootCmd .PersistentFlags ().BoolP ("always-wrap-errors" , "" , false , "Wrap all returned errors with stacktraces, also sql.ErrNoRows" )
106107 rootCmd .PersistentFlags ().BoolP ("add-global-variants" , "" , false , "Enable generation for global variants" )
107108 rootCmd .PersistentFlags ().BoolP ("add-panic-variants" , "" , false , "Enable generation for panic variants" )
@@ -173,6 +174,7 @@ func preRun(cmd *cobra.Command, args []string) error {
173174 NoAutoTimestamps : viper .GetBool ("no-auto-timestamps" ),
174175 NoDriverTemplates : viper .GetBool ("no-driver-templates" ),
175176 NoBackReferencing : viper .GetBool ("no-back-referencing" ),
177+ NoRelationGetters : viper .GetBool ("no-relation-getters" ),
176178 AlwaysWrapErrors : viper .GetBool ("always-wrap-errors" ),
177179 Wipe : viper .GetBool ("wipe" ),
178180 StructTagCasing : strings .ToLower (viper .GetString ("struct-tag-casing" )), // camel | snake | title
0 commit comments