RushOrm icon indicating copy to clipboard operation
RushOrm copied to clipboard

column constraints

Open emdete opened this issue 10 years ago • 4 comments

hi,

how do i formulate column constrants like not null or uniqie? didn't i just find it, isn't it documented or is it missing?

best regards, m.

p.s.: thank you for the work on RushORM, nice tool!

emdete avatar Sep 04 '15 19:09 emdete

Thanks glad you like the library.

There is no way to add column constraints. The only way I can think to add that feature would be by throwing an exception when save is called, but that change would be pretty bad for backwards compatibility.

I'll think about it for the future but for now you may just have to add your own is valid method before calling saving.

Thanks

Stuart-campbell avatar Sep 05 '15 15:09 Stuart-campbell

i would like to have an annotation like RushUnique and RushNotnull to denote that and the table is created like that then. it would not break anything because nobody is using those annotations till now. but used you have to handle exceptions accordingly. what do you think?

emdete avatar Sep 06 '15 08:09 emdete

Hi, I'm facing the same issue with constraints. It could be a valid and interesting enhancement the one suggested by @emdete .

Regards!

gcalaprice avatar Oct 02 '15 16:10 gcalaprice

Planned for v1.2 hopefully complete in the new year

Stuart-campbell avatar Dec 02 '15 08:12 Stuart-campbell