-
-
Notifications
You must be signed in to change notification settings - Fork 539
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
Is it possible to customize the id field? #11
Comments
I think it's possible. We already have |
Thank you! |
I took a look briefly at this since I was also interested in having this. I think it might be a bit more nuanced because a lot of places assume
This leads me to another nuance which is handling the case where this Sorry about puking my thoughts out on the page but hopefully that gets through. I'd be really interested in seeing this happen since I like to have Edit If you set the
For example, would the library process that correctly? If so I guess we could technically parse the identifier something along the lines of
D |
Valid point by @dhaspden We rarely use the type |
+1: |
+1: id should be type string as option (UUID) |
crud/src/decorators/crud.decorator.ts Line 183 in 69da293
change to createParamMetadata(RouteParamtypes.PARAM, 0, [], 'id'), |
Shipped with v3.0.0 |
Thank you very much |
Ok, |
ok, this just worked for me in the entity level: @PrimaryColumn({
name: "bt_brand_id",
length: 20,
type: "varchar",
})
public id!: string; But if there's a way on the that lib level, i think i will prefer it |
I can now do just this:
and it's working- |
The lib is looking for field named
id
automaticity,my id name is different or sometimes i even don't have one/some times its composited
Thanks!
The text was updated successfully, but these errors were encountered: