You are not logged in.
Pages: 1
Hm, I'm a little bit confused now, because I have done a fresh installation some days ago and remembered the problem today. How did you get the mORMot into Lazarus, have you used also fpcupdeluxe installing it into ccr? But should not make any difference.
So I will give it a try to clean up my whole installation again. fpc sources now are synced and it seems the structure is inside (again?) in typinfo.pp ?! But I have to wait lazarus is ready with compile.....
You are right, now everything works fine - thanks for your hint!
Hi,
I'm running into the same problem when I didn't use NewPascal. Tried out stable and trunk with FPCUPdeluxe, same error message as shown from JD in #6 above. None of the included demos like TestSQL3.lpi aso works anymore.
Is there a way to get back mORMot running against the latest changes in typinfo.pp without the PRecInitData structure?
Thx a lot
Carsten
I'm trying to implement an object view for a given database. With a single class and the mapping change via .ExternalDB.MapField I found the way to grab records and store them back with their internal database key field. Also the loading of a "list" of objects with CreateAndFillPrepare / .FillOne and a wider select works fine (i.e. load all TDest).
So now I want to include one class into another, because in database it is a sub table and I want the sub class to be autoloaded, if the top class is loaded.
type
TDest = class;
TSource = class;
TDests = class(TSQLRecordMany)
..
property Source: TSource..
property Dest: TDest...
...
TSource = class(TSQLRecord)
property Destinations: TDests read fDestinations;
end;
VirtualTableExternalRegister(Model, TDest, aConnProps, 'D_TABLE_DEST);
VirtualTableExternalRegister(Model, TSource, aConnProps, 'D_TABLE_SRC');
Model.Props[TDest].ExternalDB.MapField('ID', 'D_DST_ID');
Model.Props[TDests].ExternalDB.MapField('ID', 'D_DST_ID');
Model.Props[TSource].ExternalDB.MapField('ID', 'D_SRC_ID');
The TDests object is created in constructor of TSource. But the linking between the two tables is not done via a ManyToMany table inbetween. The TDest table has a column which refers to the source table (ID_SRC_TABLE). Did I have a chance to modify the autoconstructed joins and tell the created model, that the field "D_DST_SRC_ID" should be used to identify all TDest(s) and load them into Destinations within the loading/creating a TSource?
Maybe this is a very simple thing to do, but I'm looking for a solution now several hours without finding an answer. All examples I've found in the SQLLite3\Samples are using the auto mechanism for joining. If I run the server with this shorten example I always getting the error message "TDests expects a SOURCE field" - so I'm searching where to set it correctly.
Hello,
many thanks for this informations, bringing me on track So I will use the internal delphi owned json routines an pass the argument as log string. Did you see a chance to log objects with serialization also in flat text files in a future version or mORMot?
I tried out and see the difference in output going to Console and Debug console - my error in understanding. Sorry about that. DebuggerNotify works fine and as I need, console output also!
Happy (white?) Easter days
Excalibur (Carsten)
Hi to all,
I'm new here and to mORMot also Yesterday I looked up the possibilities to create file based logging and found SynLog.pas.
I'm using the nightly build from yesterday, Delphi is XE5. But two small things I didn't get running.
1.) If I want to log a TPersistent object always "info null" written to the log file
TTest = class(TPersistent)
private
FVorname: SynUnicode;
FNachname: SynUnicode;
FPLZ: integer;
published
property Vorname: SynUnicode read FVorname write FVorname;
property Nachname: SynUnicode read FNachname write FNachname;
property PLZ: integer read FPLZ write FPLZ;
end;
..
var
test: TTest;
begin
test := TTest.Create;
try
test.Vorname := 'Carsten';
TSynLog.Add.Log(sllInfo, test);
finally
test.Free;
end;
// Part where it is produced is SynCommons.pas, line about 34486
// Last part always true and nil is assigned
// didn't it work with TPersistent and published properties??
procedure TTextWriter.WriteObject(Value: TObject; Options: TTextWriterWriteObjectOptions);
...
if not(woFullExpand in Options) or
not (Value.InheritsFrom(TList)
{$ifndef LVCL} or Value.InheritsFrom(TCollection){$endif}) then
Value := nil;
...
How could I write an object content in json notation? Didn't find an automatic call to WriteObjectAsString to serialize objects to json.
2.) Debug console doesn't work for me, as descriped in this thread. As written I'm using the nighly build with the discribed changes included
http://synopse.info/forum/viewtopic.php?id=2419
I used exact the same example, nothing appears in Debug/Messages window, if I use OutputDebugString instead it works.
Because many more people will use logging, my thought is that something is missing or misconfigurated in my environment.
I only use SynCommons.pas, SynLog.pas, Synapse.inc (without modification), SynLz.pas and SynZip.pas + the two .obj files for packing logs into zip files. But packing can't be the problem, both problems occurring in flat file logging.
Thanks for your time to read and any hint
Excalibur (Carsten)
Pages: 1