uptrace / bun

SQL-first Golang ORM
https://bun.uptrace.dev
BSD 2-Clause "Simplified" License
3.46k stars 206 forks source link

model tag "alt" don't work #954

Closed emileFRT closed 3 months ago

emileFRT commented 5 months ago

The documentation states that bun:"alt:alt_name" is a valid struct tag, but i get WARN: bun: [.. ]has unknown tag option: "alt" when trying to use it. I don't see it listed as a field option in the function isKnownFieldOption where there is an "alias" option that i do not understand for fields. I'm willing to try to fix it if it's indeed a bug

vallahaye commented 4 months ago

Hello everyone,

I'm facing the same problem. I had planned to use "alt" annotations to implement generic repositories but unfortunately this has to be put aside until this problem is solved. I've had a look at the linked PR and the fix seems very straightforward. Do you have any idea when it might be merged?

Thanks in advance, Bun is an excellent software!