Skip to content
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

Non-Enum types require ActiveEnum trait when used a primary keys. #2435

Open
DenuxPlays opened this issue Dec 2, 2024 · 0 comments
Open

Comments

@DenuxPlays
Copy link

Description

See here: #1807

It's been unanswered for more than a year and it isn't really a discussion and more like a bug.
In my case I have a wrapper type (named Snowflake) around i64 rust type.
So for every trait that needs to be implemented I can just call the appropriate method on i64 but ActiveEnum is not implemented for it but I can still use it as a primary key?

Steps to Reproduce

  1. Create a custom type and implement all necessary traits mentioned here
  2. Use that type inside a sea-orm entity as a primary key
  3. try cargo build

Expected Behavior

I dont need to implement ActiveEnum traits for non-enum types.

Actual Behavior

It requires me to do so.

Reproduces How Often

Everytime

Workarounds

Non / Custom types are unuseable here.

Reproducible Example

See discussion

Versions

1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant