You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the CustomStringConvertible conformance provided by AnyModel, the rules of dynamic dispatch through existentials, and the behavior of Mirror, Fluent malfunctions badly if a model tries to provide an optional description property as a database field. There is no warning from the compiler or the framework for this scenario and no indication whatsoever of the underlying cause. Fluent needs to either trigger an assertion as easily as possible for such properties, or - much more preferably - handle them gracefully. (Note: The latter is badly complicated by the fact that it would be a semver-major break to remove the CustomStringConvertible conformance from AnyModel. Look into whether sneaking around the problem using something like the @_implements attribute would work.)
The text was updated successfully, but these errors were encountered:
Due to the
CustomStringConvertible
conformance provided byAnyModel
, the rules of dynamic dispatch through existentials, and the behavior ofMirror
, Fluent malfunctions badly if a model tries to provide an optionaldescription
property as a database field. There is no warning from the compiler or the framework for this scenario and no indication whatsoever of the underlying cause. Fluent needs to either trigger an assertion as easily as possible for such properties, or - much more preferably - handle them gracefully. (Note: The latter is badly complicated by the fact that it would be a semver-major break to remove theCustomStringConvertible
conformance fromAnyModel
. Look into whether sneaking around the problem using something like the@_implements
attribute would work.)The text was updated successfully, but these errors were encountered: