#1 mORMot 1 » soa method with T*ObjArray parameter and blob field » 2021-03-27 09:26:25

ianxevcd
Replies: 1

Hi,
I have defined
  TOrmList = class(TOrm)
  private
    fName: RawUTF8;
    fData: TSQLRawBlob;
  published
    property Name: RawUTF8 index 2048 read fName write fName;
    property Data: TSQLRawBlob read fData write fData;
  end;
and service with the following method:
function GetList(var List: T*ObjArray; const ParentID: TID): boolean;
begin
  result := Server.RetrieveListObjArray(List, TOrmList, 'ID=?', [ParentID], '*');
end;

When I call this service method on client I get List w/o Blob data. If I define function to return T*ObjArray it returns array with blob data.
I thought the correct way is to get such list via var parameter. Do I something wrong?

ps. I use mormot2 and FPC 3.2.1

#2 Re: mORMot 1 » Documentation of the Synopse SQLite3 / mORMot Framework » 2021-02-15 09:59:55

It seems there is mix up with Supervisor rights in 21.1.2.1. Per-User authentication chapter. POST SQL should be No and SELECT SQL should be Yes.

#3 Re: mORMot 1 » basilique project from ekon » 2020-05-12 07:33:54

Would be nice if could explain a bit what should do Infrastructure Layer in infra folder. Thanks in advance.

#5 mORMot 1 » A class named TJPEGImage already exists » 2019-05-21 11:55:09

ianxevcd
Replies: 3

Hi,
I think there should be a check if the class is already registered in TGDIPlus.RegisterPictures. I use 3rd-party component where Jpeg and PngImage classes registered too. So, when It loads before mormot I got exception there.

#6 Re: mORMot 1 » Authorization tables not created with "CreateMissingTables » 2019-04-23 10:16:47

As I understand your call CreateMissingTables(0) means database schema is not modified. Try to use just DBServer.CreateMissingTables;

#7 Re: mORMot 1 » How to work with CanUserLog? » 2019-04-17 16:13:13

Thank you. I think I figured out how to work with it.

#8 mORMot 1 » How to work with CanUserLog? » 2019-04-17 10:53:21

ianxevcd
Replies: 2

Hi,
I need to make some additional user checks when user log in, e.g. his current status. As I understand I can make it in CanUserLog function. Does anybody have an example? Thanks.

#9 mORMot 1 » UpdateField and TRecordVersion property » 2016-07-28 09:45:02

ianxevcd
Replies: 0

Hi,
I cannot execute UpdateField method without error if table has TRecordVersion property. Is it bug or feature?

#10 Re: mORMot 1 » per row access » 2016-07-04 10:07:01

Sorry, it wasn't clear. I need to have row level security for users. For example, in your '26 - RESTful ORM' sample I'd like to add e.g. field Owner:

  TSQLNote = class(TSQLRecordWithModTimeAndMetaData)
  protected
    fIdent: RawUTF8;
    fKind: TSQLNoteKind;
    fParent: TSQLNote;
    fOwner: TSQLUser;
  published
    property Ident: RawUTF8 read fIdent write fIdent;
    property Kind: TSQLNoteKind read fKind write fKind;
    property Parent: TSQLNote read fParent write fParent;
    property Owner: TSQLUser read fOwner write fOwner;
  end;

and then show records that authenticated User own.  Should I add to TSQLNote my own function for such filtering or I should do something else? Thanks in advance for your help.

#11 mORMot 1 » per row access » 2016-07-04 08:08:25

ianxevcd
Replies: 4

Hi all,

Does anybody have example of how to implement per row access to table data using this framework?

Board footer

Powered by FluxBB