Closed ttys3 closed 2 years ago
Hello, @ttys3! Thank you for the report. Can write a small example which reproduces error?
And I think varbinary is not equal to String. You can use Binary instead of String.
Hey @ttys3, I think varbinary
should represented as Vec<u8>
in Rust
@ikrivosheev @billy1624 I updated the issue with re-produce steps.
I think the problem is sea-orm-cli generate entity does not support table has VARBINARY fields
Ah... I understand, problem is in generator. Thank you for the report.
Description
create table with field like
varbinary(20)
will result in error withfind_by_id(id)
Steps to Reproduce
demo
which has avarbinary(20)
fieldsea-orm-cli generate entity -t demo
and we'll got
and we got the errror "mismatched types; Rust type core::option::Option (as SQL type VARCHAR) is not compatible with SQL type VARBINARY"
Expected Behavior
sea-orm-cli generate entity with table has
VARBINARY
fields executefind_by_id
query has no problemActual Behavior
sea-orm-cli generate entity with table has (as SQL type VARCHAR) is not compatible with SQL type VARBINARY"
VARBINARY
fields executefind_by_id
query got "mismatched types; Rust type core::option::OptionReproduces How Often
always reproducible
Versions
Additional Information