Closed ItayGarin closed 3 years ago
So it seems to be maybe a failure in the templating where it doesn't understand that your column types are primitives? https://github.com/volatiletech/sqlboiler/blob/master/templates/07_relationship_to_one_eager.go.tpl#L29-L35
I'm not sure how this is happening. I generated code based on the schema you gave me but LoadFeeCoin
doesn't exist so it's hard to verify. Can you please re-submit a more contained example?
@ItayGarin it seems you attached an example and then deleted it. Will close this issue as I assume everything's been taken care of by this point.
What version of SQLBoiler are you using (
sqlboiler --version
)?SQLBoiler v4.5.0
What is your database and version (eg. Postgresql 10)
sqlite3
If this happened at runtime what code produced the issue? (if not applicable leave blank)
What is the output of the command above with the
-d
flag added to it? (Provided you are comfortable sharing this, it contains a blueprint of your schema)Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
simplified schema -
Further information. What did you do, what did you expect?
Playing around with sqlboiler these past few days. Really liking it so far! Thanks for all the hard work!!
I believe the generated
Load...()
functions expect the column struct field to be nullable. Though, if I use theNOT NULL
constraint in my schema, sqlboiler uses the regular int64 type for the field. If I remove theNOT NULL
constraint, the code above works without crashing.Am I'm missing something here? Would love to hear your thoughts :)