strak2015 / delphi-orm

Automatically exported from code.google.com/p/delphi-orm
0 stars 0 forks source link

Avoid TdormObject for validation poupose, use IdormValidation instead #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, to use the automatic validation, a BO must descend from TdormObject. 
Should be better if, to use validation, I have to implement an interface only.

Original issue reported on code.google.com by daniele....@gmail.com on 27 Nov 2011 at 4:51

GoogleCodeExporter commented 8 years ago
This was the first implementation. HOwever, I'm faced with some reference 
counting problem.
When, in the session, I check for interface implementation, and extract the 
reaference, the refcount become 1. When the interface exit from the scope, the 
refcount reach 0 and the object is destroied. In this case I should change the 
TInterfacedObject implementation. But, in this case, thare arent real 
advantages to change from TdormObject to TdormInterfacedObject...
However, I'm still looking for a better/elegant/performant solution. 

Original comment by daniele....@gmail.com on 5 Jan 2012 at 8:46

GoogleCodeExporter commented 8 years ago
I'm doing some research about ducktype the object as the WrapAsList do. The 
same approach will be used also with the "state" field. I. This way dorm dont 
loose the persistence ignorance and gain simplicity.

Original comment by daniele....@gmail.com on 16 Aug 2012 at 8:57

GoogleCodeExporter commented 8 years ago
closed using ducktyping

Original comment by daniele....@gmail.com on 5 Feb 2013 at 2:57