#1 Re: mORMot 2 » Using TCollection inTOrm » 2023-05-28 07:01:57

The same happens when using one of the Create functions with paramters.

Order := TOrmOrderBook.Create(TestClient.Orm, 'OrderNo = ?', ['Order1']);

The work around is currently using the Retrieve function like

Order := TOrmOrderBook.Create;
    TestClient.Orm.Retrieve('OrderNo = ?', [], ['Order1'], Order); 

I updated the tests in https://gist.github.com/martin-doyle/6c … a26990e46e.

By the way, I like the idea of embedding detail data within the record (sharding). Would be interesting to know what other people use, just schemaless TDocVariant?

#2 Re: mORMot 2 » Using TCollection inTOrm » 2023-05-24 17:05:37

Thanks Thomas, that keeps me working.
I was only able finding the right commit and spot. This fix helps a lot.

#3 mORMot 2 » Using TCollection inTOrm » 2023-05-23 19:21:00

Replies: 5

In mORMot1 I used to use TCollection a lot as described in the documentation in TPersistent/TCollection fields. This also worked in mORMot2 until commit 88742d0 several ORM raw optimizations.

As far as I can see the create constructor was changed to InternalCreate which does not call the overloaded Create constructor anymore.
So the TCollection is not created anymore, is null and can't be set when getting data from the database.

constructor TSQLRecordPeopleObject.Create;
  fPersistent := TCollTst.Create;
  fUTF8 := TRawUTF8List.Create;

Please find a test example in https://gist.github.com/martin-doyle/a4 … 18facfad6c.

Is TCollection still supported and what is the recommended way of using it?

#4 Re: mORMot 1 » Variant Error running mORMot tests on Debian 11 » 2022-07-10 09:58:33

Interesting that it happened right after the os upgrade. I reinstalled FPC and everything works fine. Just in case somebody else runs into the same issue.
Thanks a lot and sorry for the confusion.

#5 mORMot 1 » Variant Error running mORMot tests on Debian 11 » 2022-07-09 10:31:31

Replies: 3

Just updated from Debian 10 Buster to Debian11 Bullseye. Some variant tests fail using the underscore syntax.

Example TTestCoreProcess._TDocVariant => CheckDoc line 4229 Check(variant(Doc)._(0) = 'John');
Error message TDocVariant.DispInvoke: invalid (1) call
mormot.core.variants.pas lines 3430 and 3533

#6 Re: mORMot 1 » mORMot 2 ORM Performance » 2022-02-19 08:25:05

Great news. And yes it works on aarch64 as well giving similar good numbers.

#7 Re: mORMot 1 » mORMot2 on ARM » 2022-02-13 09:13:46

I kept testing on MacOS aarch64.

First, I compiled the newest sqlite3 3.37.2 and the installation worked without any problem. Then I thought, maybe compiling the static libraries works as well. I could compile armv8.c from the res directory. This made building the mormot2 package possible.
Compiling the sqlite3 library was a little trickier. I had to patch the amalgamation file on Linux since „sed“ works a little different on MacOS.

To make a long story short, I could compile and run the mormot tests with static libraries.
I had to disable a couple of tests which froze but it is a good start. https://gist.github.com/martin-doyle/0f … e9dacdc252

A first issue I found was a segmentation fault when creating the BloomFilter. ln(fFalsePositivePercent / 100) crashes. ln(0.01) works just fine. I created a little fpc test program in order to see if it is a fpc, type whatever issue. But no problem here - ln seems to work as expected but behaves strangely within the Create method of Bloomfilter.

#8 Re: mORMot 1 » mORMot2 on ARM » 2022-02-08 11:04:23

„4x generic aes sha crc aarch64 cpu“ on Linux.
„8x MacBookPro18,3 (aarch64)“ on MacOS. I just started some tests with the external sqlite 3.36.0 library. Would be interesting to do tests with the static libraries.

#9 Re: mORMot 1 » mORMot2 on ARM » 2022-02-06 19:05:57

Oops. My VM had only 2 cores with 4 GB RAM.
For 4 cores and 8GB it looks like this https://gist.github.com/martin-doyle/e0 … 22075e6de0.

cat /proc/cpuinfo does not give any information about the cpu details only some cryptic numbers. sysctl -a machdep.cpu only works on the macOS terminal. Let me further check.

#10 Re: mORMot 1 » mORMot2 on ARM » 2022-02-06 16:50:35

Wow. AAALLL green now.

Total assertions failed for all test suits:  0 / 71,390,226
! All tests passed successfully.

https://gist.Github.com/martin-doyle/a8 … 7985572920.

#11 Re: mORMot 1 » mORMot2 on ARM » 2022-02-06 08:40:06

I ran the tests several times. Please find the numbers here https://gist.github.com/martin-doyle/8b … c7d68cfd7c.

The failed tests starting at 2.1 ORM Core seem to have the same root cause. The InMemory storage reading existing data - i.e. TTestOrmCore._TRestServerFullMemory line 299 - fails due to duplicate entries. TRestStorageInMemory.LoadFromBinariy loads all entries correctly but in ComputeStateAfterLoad it seems that the PtrInt dup variable is not set in/after fValues.Hasher.ForceReHash(@dup).

#12 Re: mORMot 1 » mORMot2 on ARM » 2022-02-05 16:30:27

Please find the output from the tests on gist https://gist.github.com/martin-doyle/44 … 99bc915c56. Might be also interesting to see the numbers.

#13 Re: mORMot 1 » mORMot2 on ARM » 2022-02-05 10:54:44

OK. I checked again my setup. FPC is available for aarch64 only since version 3.2.2.
First I cross compiled from FPC 3.2.0  Debian X64 to aarch64 and I did not get the above error messages. All Variant tests were fine.
Second I reinstalled FPC fixes-3.2 and Lazarus fixes-2.2 on Debian aarch64 with FPCUPdeluxe 2.2.0h. The installed versions are now FPC 3.2.3-582-gdba65567f1 and Lazarus 2.2.0-64-gff329cf453. And guess what, no Variant test issues anymore.
There are a few tests left which fail and I will keep checking. Thanks ab and Alfred for the great job.

#14 Re: mORMot 1 » mORMot2 on ARM » 2022-02-03 20:58:59

As far as I can see the only issue with aarch64 is TDocVariant. All tests with TDocVariantData like AddValue fail. The tests with variants are fine. I do not know what to do at the moment since Step into AddValue already causes an error message -> log message TSysVariant {Message: TDocVariant.DispInvoke: invalid (1) call“} [Main] at 696618 … variants.pas (3490) variants (3597) variants (8938).

#15 mORMot 1 » mORMot2 on ARM » 2022-01-29 16:54:44

Replies: 46

I am wondering if ARM will be a focus target for mORMot2 in the future. Linux aarch64 is supported but I believe it is not as maintained as the x64 platform. I do not know if the Oracle cloud is still used in the current development. When running the tests there are a couple of errors.
ARM is a hot topic for Apple and Windows 11 is also available for ARM now.
I have a new Mac M1 and I got FPC and Lazarus running on MacOS which is pretty cool. A client application with ORM and HTTP already works. Next I will test a server app with external sqlite3 libs since there are no arm static files other than for Linux. So, if this interesting I would be happy to help testing and building.


#16 mORMot 1 » mORMot2 examples » 2021-02-27 07:45:51

Replies: 5

Good morning,

I really like the new design of mORMot2 and I assume it will increase the already breathtaking speed of development. It is just an amazing piece of software.
As others mentioned, the transition from mORMot1 is not that easy. So I started a couple of examples in my fork of the project.

https://github.com/martin-doyle/mORMot2 … rtin-doyle

The goals I want to accomplish are the following:

- Get the examples running with PUREMORMOT2 definition (done)
- The examples should work in Delphi 7 and FPC on Windows and Debian Linux (X86_64 server and client, ARM64 server only) (done, not yet tested on ARM64)
- Make the same use case work for different technical approaches like ORM, method based and interfaced based services (started, probably not yet correct)
- Create a best practice starting point for different scenarios like a standalone client only application, local network client server, client server on the internet. (open)

Any feedback is welcome.


Board footer

Powered by FluxBB