SessionVars not working as should

If you think that something doesn't work in Aware IM post your message here
Post Reply
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

SessionVars not working as should

Post by BLOMASKY »

There seems to be a problem when updating the new in memory session vars.

Stuff that works fine using LoggedInSystemUser (LISU) do not work when using the session vars. It almost seems like there is a transaction that is started and not letting me have access to the data.

Example, I have a Parent / child grid on a VP.
In the parent when I click on a row, I have a process that saves the ID in a session Var. Then I have the child grid refresh with the query "FIND Child where Child.ob_parent = SessionVars.parentID. This does not work but changing the sessionVars to LISU it works fine.

Bruce
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: SessionVars not working as should

Post by aware_support »

This seems to work fine for us. Would you be able to create a small BSV that demonstrates the problem?
Aware IM Support Team
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: SessionVars not working as should

Post by aware_support »

Definitely works for us. Please send the BSV
Aware IM Support Team
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: SessionVars not working as should

Post by PointsWell »

Bruce,

Did this ever get fixed? I am having the same problem.

I am assuming it is a typo your example code seems to have an error

Code: Select all

FIND Child where Child.ob_parent = SessionVars.parentID.
It seems that an object is being matched with an ID
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: SessionVars not working as should

Post by customaware »

Wouldn't it need to be....?

FIND Child where Child.ob_parent.ID = SessionVars.parentID
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: SessionVars not working as should

Post by BLOMASKY »

ParentID WAS pointing to a BO. (sorry, bad naming).

Bruce
nhofkes
Posts: 94
Joined: Mon Sep 07, 2020 6:03 am
Location: Netherlands

Re: SessionVars not working as should

Post by nhofkes »

I have found earlier that the in memory session object (which by definition is not persisted) cannot be used for multiple reference attributes (1-n). It seems that the additional cross reference tables that are used for those attributes are not stored in the session object, therefore the reference attributes are not resolved. The work around is either to store the ID itself in the session object (rather than using multiple reference attributes), or use a persisted object for this purpose.
See also this earlier thread.

However, single reference attributes are possible I think.
Niels
(V9.0 build 3241 - MariaDB - Windows)
Post Reply