Hello,

Currently, I'm testing, like described a few days ago the PO-module.

Now I've been stopped by a very heavy inconsistence using identity mapping.

prerequisites:
I'm using an file name based autoloading mechanism for own class tree, to
bypass the creation of any entry within an autoload file.

I've created a PO definition base for all database tables within a sub
directory.
Each ->class entry within definition file points to a specific class, which
can be mapped by the fileName based autoload mechanism.

Creating a PersistentObject query works with ezcPersistentSession but not
with ezcPersistentSessionIdentityDecorator.


Here is the simple code segment, which only works with simple
ezcPersistentSession:

        $session = ezcPersistentSessionInstance::get(false);
        $q       = $session->createFindQuery('tableDefintion');
        $q->where(
            $q->expr->eq('field', $q->bindValue($data))
        )   ;
        $objects = $session->find( $q );
 

Definition 'tabledefinition' is like:
$def        = new ezcPersistentObjectDefinition();
$def->table = "table";
$def->class = "PathToObjectClass";
(would mean $baseDir/path/to/object/class.php)

Without identity "tableDefinition" is used to get definition and create PO
object from $def->class.
But with identity mapping, the method performFind (identity.php, line 433)
tries to fetch definition from get_class(), which would point to a non
existent file pathtoobjectclass.php within definition path.

This seems to be very inconsistent, because the class name and the
definition name must be always the same.

This would make file names less readable and path refactoring very hard.

So is this a bug or a feature?


Kind Regards


Christian Michel





-- 
Christian Michel
Programmierung / Technik
www.billiger-mietwagen.de

-----------------------------
SilverTours GmbH
Zweigstelle Köln
Dompropst-Ketzer-Str. 1-9
50667 Köln

HRB: 7144 (Amtsgericht Freiburg)
Geschäftsführer: Christian Mahnke

Tel.: (+49) 0221 272-408-80
Fax: (+49) 0221 272-408-29


-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to