2
I Use This!
Very Low Activity

News

Analyzed 1 day ago. based on code collected 3 days ago.
Posted over 3 years ago by mdoyle
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 ... [More] 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 … e9dacdc252A 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. [Less]
Posted over 3 years ago by dcoun
You have right, I am absolutely with you. But for a 12 years old application still in use and learning mormot2 at the same time, I have to go with smaller steps: Refractor the code inside the application that will be the future service.I am waiting also the mobile Delphi compatible part of mormot2 before splitting the service code.
Posted over 3 years ago by AOG
Bugger reported.https://gitlab.com/freepascal.org/fpc/s … sues/39569
Posted over 3 years ago by ab
So you broke the code expectations.Please check https://github.com/synopse/mORMot2/commit/b55f3504It should fix your problem.
Posted over 3 years ago by ab
It was not used in the mORMot code, but expected in your code.Now it makes sense.Sorry for the problem.
Posted over 3 years ago by dcoun
similar discussion:https://forum.lazarus.freepascal.org/in … ic=40286.0
Posted over 3 years ago by konsul41
I am currently using Mormot to connect to an old MSSQL database which has its own login system (table) with its own password encryption.I made my own TAuthUser and mapped the AuthUser fields to the fields in the table.I am running ... [More] TSQLRestServerAuthenticationDefault and fetching user from database is currently working. I am getting an error that the password is not valid.Now I would like to use the method of password transmission used by TSQLRestServerAuthenticationDefault and only decode the password on the server side and check if the password is correct.Is that a good way and is it possible at all? [Less]
Posted over 3 years ago by ab
@AOGIs the current fpcupdeluxe able to cross-compile from Linux to Darwin AArch64?Could we use these cross-compile tools to statically compile the SQlite3 static library?
Posted over 3 years ago by ab
Just thinking out loud.If I understand correctly, your concept of "master article" is similar to a template, or the master slide in PowerPoint.In a relational model, you would have two tables, and let the variant articles take the information from ... [More] the master table, using a join.I guess you are closer to the Aggregate model here.Some remarks in respect to the Aggregate model:1. First of all, I would not use TransactionBegin+Update, but a TRestBatch for the modifications. It will be easier to code, and also faster.Your data should not have to rollback anyway, because the DB should never fail, just persist the data.2. The concept of aggregate don't have much interest outside of the notion of bounded concept boundaries.You are still focusing on the data. I would define several services, with two repositories. Or a single service, but two well defined aggregates, because they have two contexts.3. If you need to update several articles, then your don't properly implement the Aggregate pattern. The Aggregate should be a single ORM instance. So the variant articles should be stored as a single ORM instance, depending on the bounded context.So in fact, your code should consist just in TWO Update() calls, one for the master article, another for the variant articles - all linked together within a single class. To be more efficient, the Update() may only occur on some fields, but it would change everything at once, using a single ORM class instance each time.4. And if you have proper Aggregates defined, then even the Batch would not be needed any more. Just two Update() calls would be enough. [Less]
Posted over 3 years ago by ab
Your main problem is that you don't have a service.Don't let the workstations directly access the database, but create a service which will maintain the ID and have the DB connection.It will be safer and also faster. Then the service will be able to ... [More] grow up and do more than what you expect now.Or use TSynUniqueIdentifier to generate the IDs in several points with no collision.Or use a MariaDB sequence (there is no direct support of sequences in our ORM because it is not supported on all DB).Because even EngineAddUseSelectMaxID may have troubles, and is subject to race condition if two instances are running it on the same time. [Less]