Comments (3)
There is a test case for the mapped superclass scenario your setup describes.
Adding dd($this->softDeleteableListener->getConfiguration($this->em, self::MAPPED_SUPERCLASS_CHILD_CLASS));
to the start of that test case shows what looks to be the right configuration for that entity:
array:5 [
"softDeleteable" => true
"fieldName" => "deletedAt"
"timeAware" => false
"hardDelete" => true
"useObjectClass" => "Gedmo\Tests\SoftDeleteable\Fixture\Entity\Child"
]
I also went ahead and added the TimestampableEntity
trait to the mapped superclass and the TimestampableListener
to that test case and dumping the entire static config reference in the subscriber's getConfiguration()
method gives me this:
array:2 [
"SoftDeleteable" => array:9 [
[snip]
"Gedmo\Tests\SoftDeleteable\Fixture\Entity\Child" => array:5 [
"softDeleteable" => true
"fieldName" => "deletedAt"
"timeAware" => false
"hardDelete" => true
"useObjectClass" => "Gedmo\Tests\SoftDeleteable\Fixture\Entity\Child"
]
[snip]
]
"Timestampable" => array:1 [
"Gedmo\Tests\SoftDeleteable\Fixture\Entity\Child" => array:3 [
"create" => array:1 [
0 => "createdAt"
]
"update" => array:1 [
0 => "updatedAt"
]
"useObjectClass" => "Gedmo\Tests\SoftDeleteable\Fixture\Entity\Child"
]
]
]
So, the config does appear to be loaded in properly.
from doctrineextensions.
OKay @mbabker . Excuse me, but I have not clearly how do I must to continue.
What do you need exactly from my side? Do you need I execute the test case and write down here the result of the dd()
function?
from doctrineextensions.
@nacesprin
in your example you wrote. #MappedSuperclass
Is it a correct PHP Attribute or just a comment?
The Entity Mapping is missing in doctrine.yaml
.
I use the StofDoctrineExtensionsBundle so i am not sure for your case.
# StofDoctrineExtensionsBundle (https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/configuration.html#add-the-extensions-to-your-mapping)
gedmo_loggable:
type: attribute
prefix: Gedmo\Loggable\Entity
dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Loggable/Entity"
alias: GedmoLoggable # (optional) it will default to the name set for the mapping
is_bundle: false
from doctrineextensions.
Related Issues (20)
- The bundle not set automatcly the value to updated_at and created_at columns when persisting data HOT 6
- Missing Reference Listener in the documentation
- [Tree] [materializedPath] Deleting parent removes children when onDelete="restrict" HOT 2
- Cannot get DoctrineExtensions to work with Symfony 7 HOT 3
- The service "gedmo.listener.softdeleteable" has a dependency on a non-existent service "annotation_reader". HOT 2
- Table ext_log_entries very very slow on queries HOT 7
- Timestampable issue mapping expects array HOT 2
- LogEntryInterface::getObjectClass() @phpstan-return is missing null HOT 2
- [Tree] Missing path value on insert a new document HOT 2
- Error for symfony v7 HOT 5
- A [SoftDeleteable] cycle has been detected, so a topological sort is not possible. The getCycle() method provides the list of nodes that form the cycle.
- Timestamble error getRawDateValue HOT 10
- Can't escape quote in orderby with the function INSTR() HOT 1
- Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint not compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint HOT 2
- XSD out of sync with mapping drivers
- Any plans to release a new version compatible with doctrine 3.x? HOT 13
- Library is not compatible with doctrine/dbal ^4 HOT 4
- [Tree] parent parameter typing in updateNode method (Nested strategy) HOT 1
- Gedmo\Tool\ORM\Walker\SqlWalkerCompat does not comply with psr-4 autoloading standard? HOT 9
- ORM 3 deprecations HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrineextensions.