I'm using the Komapper ORM and I can't seem to fin...
# komapper
a
I'm using the Komapper ORM and I can't seem to find a way to configure unique columns on a field via annotations. Can anyone with experience please help me with this? Thanks.
t
Komapper doesn't provide annotations for unique columns. You can add unique constraints with DDL script as follows:
Copy code
val query = QueryDsl.executeScript("alter table address add constraint city_unique unique(city)")
database.runQuery(query)
a
Okay then. Thanks.
Any plans to add this feature?
t
No plan. I do not believe it is suitable for representation in annotations.
a
Alright then. Good to know. Thanks.
👍 1