Hi, Very new to Aurelius, so prepare to flame me for "everyone knows that".....
I'm asking for better exceptions as the model is coming to life, Class: Field: <error>
TMS Data Modeler -> Aurelius for Firebird 3, Employee DB, but only for 3 tables, Sales, Country, Customer.
Start the Xdata wizard in Delphi Tokyo (I'm trying to get my head around TMS WEB Core, so a lot of 1sts here).
Wouldn't compile - had generated the association for another table that I hadn't generated the code for.
- I think the Generator could have worked that our and given me a warning on generation, but that isn't my problem - compiler caught it and all good.
Regenerated and compiled.
On running I got:
Project
VCL_XData_Server.exe raised exception class EUnexpectedFieldType with message
'Unexpected field type: System.Variant.'.
VCL_XData_Server.exe raised exception class EUnexpectedFieldType with message
'Unexpected field type: System.Variant.'.
I could see from the callstack that it was TSales, but couldn't work anything else out. Ended up stepping through code till it barfed and then going to the entity definition. It was a computed field, which got generated as:
[Column('AGED', [TColumnProp.NoInsert, TColumnProp.NoUpdate])]
FAGED: Nullable<Variant>;
With better wrapping of the call: ResolveColumnType
if DefinedType = ftUnknown then
DefinedType := ResolveFieldType(AColumn.Optimization.RealType, AColumn.Length);
a try, except, adding the fieldname would be great.
Hope that makes sense.
Regards,
Jason