@@ -101,6 +101,7 @@ Table of Contents
101
101
* [ How do I use the types.BytesArray for Postgres bytea arrays?] ( #how-do-i-use-typesbytesarray-for-postgres-bytea-arrays )
102
102
* [ Why aren't my time.Time or null.Time fields working in MySQL?] ( #why-arent-my-timetime-or-nulltime-fields-working-in-mysql )
103
103
* [ Where is the homepage?] ( #where-is-the-homepage )
104
+ * [ Why are the auto-generated tests failing?] ( #why-are-the-auto-generated-tests-failing )
104
105
* [ Benchmarks] ( #benchmarks )
105
106
106
107
## About SQL Boiler
@@ -1911,6 +1912,25 @@ You *must* use a DSN flag in MySQL connections, see: [Requirements](#requirement
1911
1912
The homepage for the [ SQLBoiler] ( https://github.com/volatiletech/sqlboiler ) [ Golang ORM] ( https://github.com/volatiletech/sqlboiler )
1912
1913
generator is located at: https://github.com/volatiletech/sqlboiler
1913
1914
1915
+ #### Why are the auto-generated tests failing?
1916
+
1917
+ The tests generated for your models package with sqlboiler are fairly
1918
+ error-prone. They are usually broken by constraints in the database
1919
+ that sqlboiler can't hope to understand.
1920
+
1921
+ During regular run-time this isn't an issue because your code will throw errors
1922
+ and you will fix it however the auto-generated tests can only report those
1923
+ errors and it seems like something is wrong when in reality the only issue is
1924
+ that the auto generated tests can't understand that your ` text ` column is
1925
+ validated by a regex that says it must be composed solely of the 'b' character
1926
+ repeated 342 times.
1927
+
1928
+ These tests are broken especially by foreign key constraints because of the
1929
+ parallelism we use. There's also no understanding in the tests of dependencies
1930
+ based on these foreign keys. As such there is a process that removes the foreign
1931
+ keys from your schema when they are run, if this process messes up you will get
1932
+ errors relating to foreign key constraints.
1933
+
1914
1934
## Benchmarks
1915
1935
1916
1936
If you'd like to run the benchmarks yourself check out our [ boilbench] ( https://github.com/volatiletech/boilbench ) repo.
0 commit comments