-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sea-orm-cli generates invalid code if a table has no primary key #126
Comments
Yes, we were in the process of a release. |
Ha yes my bad, I can confirm this works fine on 0.2.0. Another small issue though: if a table has no primary key, it generates invalid code instead of skipping it or throwing a proper error, eg: create table test
(
id bigint generated by default as identity
); generates: impl PrimaryKeyTrait for PrimaryKey {
type ValueType = ;
fn auto_increment () -> bool {
true
}
} |
Thank you for your report. I think currently SeaORM requires an Entity to have a primary key. |
With given schema:
sea-orm-cli generate
outputs:instead of:
Tested with sea-orm-cli 0.1.3
related: SeaQL/sea-schema#13
The text was updated successfully, but these errors were encountered: