You are not logged in.
Pages: 1
I am migrating a old project with TTable/TQuery to mORMot. There are some calculated fields that I want to have in the my TSQLRecord class.
But I don't want to send this fields/calculations to the server. Example
property Volume: Double read FVolume; // or GetVolume
I need Volume in published section, because I need Volume when I convert to TSynSQLTableDataSet, for use with report generators.
Any ideas, AB?
Offline
But the mORMot engine will create the Volume field in the table? I don't need and can't have that field in the table. Can you show me some sample code?
Offline
I can create a TSynSQLTableDataSet descendent and write a special case InternalInitFieldDefs. It this the best approach?
Offline
You could use 2 TSQLRecords, one for a VIEW in the db which has the calculated fields and one for the real table with only the none calc fields.
Last edited by danielkuettner (2015-09-03 16:25:23)
Offline
I know what to do with the TSynSQLTableDataSet descendent, but need some instructions about which methods I should override in TSQLRecord.
TSQLRecord.InitializeTable() is a options in this case?
Last edited by Junior/RO (2015-09-03 21:20:43)
Offline
Can you help me on this, @AB?
Offline
I can't say it better than Daniel above.
See http://synopse.info/forum/viewtopic.php … 596#p17596
Online
Pages: 1