extensions
extensions copied to clipboard
Support Request: Xml mapping TimestampableExtension not working
Hi,
Just trying to add TimestampableExtension in an XMLMapping entity and seems it is not working. No idea why. I double check everything, my config:
Composer.json versions: "gedmo/doctrine-extensions": "^2.4", "laravel-doctrine/extensions": "1.0.", "laravel-doctrine/orm": "1.4.", "laravel/framework": "5.6.*",
providers in app.php config file: LaravelDoctrine\ORM\DoctrineServiceProvider::class, LaravelDoctrine\Extensions\GedmoExtensionsServiceProvider::class,
doctrine.php config file: 'extensions' => [ //LaravelDoctrine\ORM\Extensions\TablePrefix\TablePrefixExtension::class, LaravelDoctrine\Extensions\Timestamps\TimestampableExtension::class, //LaravelDoctrine\Extensions\SoftDeletes\SoftDeleteableExtension::class, //LaravelDoctrine\Extensions\Sluggable\SluggableExtension::class, //LaravelDoctrine\Extensions\Sortable\SortableExtension::class, //LaravelDoctrine\Extensions\Tree\TreeExtension::class, //LaravelDoctrine\Extensions\Loggable\LoggableExtension::class, //LaravelDoctrine\Extensions\Blameable\BlameableExtension::class, //LaravelDoctrine\Extensions\IpTraceable\IpTraceableExtension::class, //LaravelDoctrine\Extensions\Translatable\TranslatableExtension::class ], /* |--------------------------------------------------------------------------
Gedmo extensions |
---|
Settings for Gedmo extensions |
If you want to use this you will have to require |
laravel-doctrine/extensions in your composer.json |
*/
'gedmo' => [
'all_mappings' => false
],
and my XML mapping file: `<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://Atlantic18.github.io/DoctrineExtensions/schemas/orm/doctrine-extensions-3.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Webshop\Domain\Model\Favourites\FavouritesList" table="favorites">
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
<field name="listingOrder" column="seqNo" type="integer" />
<field name="title" column="title" type="string" />
<field name="userId" column="user_id" type="integer" />
<field name="shared" column="sharedFav" type="string" />
<field name="createdAt" type="datetime" column="created_at">
<gedmo:timestampable on="create"/>
</field>
<field name="updatedAt" type="datetime" column="updated_at">
<gedmo:timestampable on="update"/>
</field>
<one-to-many field="favourites" target-entity="Webshop\Domain\Model\Favourites\Favourite" mapped-by="favouritesList" fetch="EXTRA_LAZY"/>
</entity>
`
Thanks in advance,
Did you managed to solve the problem? I'm having the same issue but with the Tree extension.. I've tried with and without the
LaravelDoctrine\Extensions\GedmoExtensionsServiceProvider::class,
As the docs says "if you're using an annotation driver"... which I'm not because I'm using xml
nope
I work with XML and TimestampableExtension, SoftDeleteableExtension
What the error says?