#1 2011-11-23 18:05:15

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

TSQLAuthUser.Data persistance

Is there a way to save custom Data in TSQLAuthUser when a session closes?

Offline

#2 2011-11-24 06:18:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: TSQLAuthUser.Data persistance

TSQLAuthUser is a regular mORMot TSQLRecord, and Data is a regular BLOB field.

So you can call TSQLRest.UpdateBlob(...) to update its content (or just Update if you have set TSQLRestClientURI.ForceBlobTransfert property).

Offline

#3 2011-11-24 06:42:23

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: TSQLAuthUser.Data persistance

What I can't work out is where to do this update. TSQLRestServer.SessionGet deletes outdated sessions - so I want to do an update when this happens. Is there a way without editing mORMots's source?

Offline

#4 2011-11-30 10:08:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: TSQLAuthUser.Data persistance

I've added a session parameter to the Service callbacks.

See http://blog.synopse.info/post/2011/11/2 … -prototype

It may help you.

Offline

Board footer

Powered by FluxBB