add warning about the generated compare method

This commit is contained in:
victorcatn 2020-12-12 00:23:24 -05:00 committed by GitHub
parent 0fe04c94ce
commit 6fb0d6f500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -76,6 +76,11 @@ The generated `User` class will then have a `preferences` column of type
the object in `select`, `update` and `insert` statements. This feature
also works with [compiled custom queries]({{ "/queries/custom" | absolute_url }}).
{{% alert title="Caution with equality" color="warning" %}}
> If your converter returns an object that is not comparable by value, the generated dataclass will not
be comparable by value.
{{% /alert %}}
### Implicit enum converters
A common scenario for type converters is to map between enums and integers by representing enums
@ -150,4 +155,4 @@ CREATE TABLE tasks (
);
```
Of course, the warning about automatic enum converters also applies to moor files.
Of course, the warning about automatic enum converters also applies to moor files.