inca / circumflex

[UNMAINTAINED] Circumflex — lightweight Scala-based Web application framework and ORM
http://circumflex.ru
Other
164 stars 35 forks source link

ignore #59

Closed freewind closed 13 years ago

freewind commented 13 years ago

ignore

inca commented 13 years ago

Well, not exactly. Setters work in both directions: when you assign a field value and when this value is read from database. Their main function is to convert a value to some common ground (which can't or shouldn't be expressed in backend as CHECK constraint). So, long story short, setters should be idempotent. Maybe you should reconsider application logic to achieve your goals (e.g. check if a field was already encrypted before encrypting again, etc.).

inca commented 13 years ago

Of course, here's how I would do that: http://github.com/inca/mystudy