hibernated
hibernated copied to clipboard
add support for unique constraint
The @Column definition currently:
struct Column {
immutable string name;
immutable int length;
}
It would be great if there was a third parameter to mark a column as being unique:
struct Column {
immutable string name;
immutable int length;
immutable bool unique;
}
I believe @UniqueKey() annotation is to be used instead @Entity class Value { @Id @Generated int id; @Column("name") @UniqueKey("name_index") string name; }
Let me know if it's not working as expected. Closing issue so far.
thanks for this. I've tried using it but it doesn't seem to work for me.
I tried using it, it didn't work for me either.