- The problem here is that due to the nature of the relationship and the
way the loop was set up it was possible to miss some relationships:
A _ C
\_ D
B _ E
\_ F
Since we looped over A and B and did a break when we found something to
attach it to (in this example A would find C) it would break. What we
should be looping through is CDEF and finding a home for each one.
Did the same change in to_one though it doesn't matter since it's
one-to-one.
to-many is untouched because it's already looping over CDEF and finding
a home for it because the relationship is reversed.
- Fix#98
- Postgres's behavior when there is no update is that there is an
ErrNoRows thrown back, which we can safely ignore since the only time
this can happen in postgres's case is under this circumstance since
there's no race unlike the mysql upsert code.
- Fix#84
- This is a bug that manifests itself a bunch with our update code where
you cannot actually use the update method to update a key since it
uses the values on the struct to both update the values and find the
object to update but in this operation the key must have two different
values.
- Make postgres name its enums
- Add way to filter columns by whether or not they're an enum
- Split parsing of enums into name & values
- Add strmangle check functions: IsEnumNormal, ShouldTitleCaseEnum
- Add new strmangle enum functions to template test
- Implement a set type called "once" inside the templates so that we can
ensure certain things only generate one time via some unique name.
- The old templates used to output \n\n after each run, with the
previous changes this is no longer the case and as such the templates
all must be formatted correctly.