Em 18/02/2016 10:12, "Marco van de Voort" <mar...@stack.nl> escreveu: > > In our previous episode, Mazola Winstrol said: > > end; > > > > > > Suppose that this class represent data of the Person table in a sql > > database. Suppose that there is records where the column "BirthDate" is > > null. How do i represent a null "BirthDate" in my object? > > Keep using variants instead of typed data. >
I think this is not a good alternative. As the variant are untyped, should the consumers of the person class assume that BirthDate are filled as a formated date string '01/01/1980' or as a native tdatetime? I think it would be better using record wrappers to primitive types. See http://blogs.embarcadero.com/abauer/2008/09/18/38869. What do you think about that?
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal