vapor/fluent-mysql-driver

Error when handling models with Date properties

Closed this issue · 1 comments

I have a Fluent model that has a Date property, which gets mapped to DATETIME in my MySQL database. If I use all() to get an array of my model object I see the data come back, and the dates are represented as epoch time. However, if I use find() to look for a particular object, I get the following error:

MySQL.MySQLError.invalidTypeBound: Field of type int was bound, mismatching the expected type datetime (supports(expecting:):Binding.swift:418:14)“

I haven't tested this using the new beta yet; this error is from alpha 12.

This has been resolved now – thank you!