[TYPO3-mvc] storagePid makes trouble in some cases

dennis ahrens dennis.ahrens at googlemail.com
Mon Mar 1 10:54:49 CET 2010


Hi List,

while working with extbase i got ofter problems with the "needed"
storagePid for domain model objects.

an example:

You have 3 extensions, which provide different domain models.
One of these EXT uses all of them. If i got a correct view the
storagePid for all my Queries is set by the dispatcher and depends on
the EXT's TS setup. I have to put all records on the same storagePid,
cause if i use my repository from EXT a) in a Controller of EXT b) the
storagePid from EXT b) is used...
Typo3QuerySettings::setRespectStoragePid() just helps me a little
there... let me explain this with another example...

I have to manage access for records depending on the record itself.
The record knows about assigned persons (from the model point of view)
and i like to provide access to this record for all assigned persons
automatically to minimize the administrative effort.
The users i have to manage are working with a BE login, thats why i
like to solve the access with the given be_users and be_groups tables.
I've wrote domain models for those tables and a service which
synchronizes the assigned persons with the be_users. those were put in
a be_group which belongs to the record.
be_users and groups have to lay on storagePid 0, if u like to manage
them the user-admin-module (please tell me if there is an options to
changes this behaviour somewhere). My EXT is looking for another
storagePid as described in the first example.
If i use Typo3QuerySettings::setRespectStoragePid() in my
BackendUserRepository it's ok for looking up the records, but when i
like to change them (f.e. adding access to a group) the
persistenceManager queries the record again, and will not find any,
cause it's using my definied storagePid.

Extbase in some cases uses automated queries which do not care my
Typo3QuerySettings - and it seems as if i have no possibility to
change this behaviour.

Does anybody knows about problems like this and had found nice
solutions or a working work-around? i've thought about changing the
ExtbaseFrameworkConfiguration from within my Repository, but i think,
that this may be very confusing when having more complex controller
actions which query different repositories.

regards
dennis


More information about the TYPO3-project-typo3v4mvc mailing list