Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Request: Xml mapping TimestampableExtension not working #44

Open
davidgil opened this issue Dec 26, 2018 · 3 comments
Open

Support Request: Xml mapping TimestampableExtension not working #44

davidgil opened this issue Dec 26, 2018 · 3 comments

Comments

@davidgil
Copy link

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:
`

<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,

@knifesk
Copy link

knifesk commented Feb 14, 2019

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

@davidgil
Copy link
Author

nope

@vv12131415
Copy link

I work with XML and TimestampableExtension, SoftDeleteableExtension

What the error says?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants