Fatal error: Class 'Model\Mapping\MetadataFactory' not found

268 views
Skip to first unread message

Nuwan Madhawa

unread,
Sep 15, 2012, 1:22:33 PM9/15/12
to mandang...@googlegroups.com
Hi,

I configured mandango according to this http://mandango.org/doc/mandango/configuration.html  but it says that "Fatal error: Class 'Model\Mapping\MetadataFactory' not found",
but help guide says that "The metadata factory class is generated by Mandango" i couldn't find it in my Model/Mapping directory.Please help....

Content on my mapping directory
├── Mapping
│   ├── MetadataInfo.php
│   └── Metadata.php


-- Nuwan --

Ahmed Nasser

unread,
Sep 20, 2012, 7:44:04 AM9/20/12
to mandang...@googlegroups.com
Hello,

You should either specify the correct class name to mondator when generating the classes, like so:

$mondator->setExtensions(array(
            new Core(array(
                'metadata_factory_class' => 'Model\Dao\Mapping\MetadataFactory',
                'metadata_factory_output' => $modelDir.'/Mapping',
                'default_output'         =>  $modelDir,
            )),
        ));

Your files should look like this after generation:

Content on my mapping directory
├── Mapping
│   ├── MetadataFactoryInfo.php
│   └── MetadataFactory.php

Or, pass the correct class name that you have generated to mandango when instantiating the mandango object like so:

metadataFactory = new Metadata();
$cache = new FilesystemCache('/path/to/query/cache/dir');
$mandango = new Mandango($metadataFactory, $cache);


I'd go with option one and name the class correctly (MetadataFactory not Metadata).


Thanks,
Ahmed.
Reply all
Reply to author
Forward
0 new messages