electricmaxxx / doctrineormphpcradapterbundle Goto Github PK
View Code? Open in Web Editor NEWBuild a bundle on top of the DoctrineOrmOdmAdapter to use it with references between orm and phpcr
Build a bundle on top of the DoctrineOrmOdmAdapter to use it with references between orm and phpcr
Is this thing completely dead?
I am getting this error with the minimum config:
doctrine_orm_phpcr_adapter:
managers:
reference-phpcr:
defaul: doctrine_phpcr.odm.default_document_manager
reference-dbal-orm:
default: doctrine.orm.default_entity_manager
adapter:
mapping: true
auto_generate_proxy_classes: %kernel.debug%
[InvalidArgumentException]
Bundle "0" does not exist or it is not enabled.
I'm having exception when I try to access to a referenced object's property
PHPCR\RepositoryException: Not an absolute path 'e7cbb4f0-74d7-4a7b-b8e3-758cb83061f2'
It seems like the listener is searching the document's Uuid
in Id
field.
For reference: https://github.com/bigfoot90/DoctrineOrmPhpcrAdapterTest/blob/access-to-reference/src/AppBundle/Tests/DoctrineOrmPhpcrAdpterTest.php#L60
The ObjectAdapterManager
got own event listeners/subscribers that works very well.
By calling objectAdapterManager->addListenersToEventManagers()
they should be added to the event managers the different object managers provides.
I tried to do the following in the bundles extension class, when creating the service definition:
$container
->setDefinition(
$adapterManager['service_name'],
new DefinitionDecorator('doctrine_orm_phpcr_adapter.adapter_manager.abstract')
)
->setArguments(array(
new Reference($abstractManagerServiceId),
new Reference($abstractEventManagerServiceId)
))
->addMethodCall('addListenersToEventManagers')
;
(that method call should triggered by some configuration #7)
Thought that can work but does not. I bridged that problem by calling the service from container and calling manually before persisting stuff, but that can't be the right way.
It would be awesome to have support for cascade
and orphanRemoval
like in ORM.
Atm the current manager comes from the registry when the referenced objects is still persisted. But for new persist i take the ' default' one only. Here i would need a mapping for the manager to use.
i got a implementation for handling different managers, configurations and event managers per name, do i need the connections mechanims too, just to implement the SymfonyBridge EventListenerSubriberCompilerPass?
The libraries events (preBindReference
, ..., onFlushReference
) should be available by tagging them. Same as other doctrine bundles serve it.
.. as it is done for common orm libraries. Especially the removeReference() will need it.
I'm trying to use your bundle on Symfony 2.6, but I'm getting ServiceNotFoundException
You have requested a non-existent service "doctrine_orm_phpcr_adapter.adapter.default_adapter_manager".
Do I need to configure something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.