Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hacfi/objectbridgebundle
https://github.com/hacfi/objectbridgebundle
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hacfi/objectbridgebundle
- Owner: hacfi
- License: mit
- Created: 2013-08-07T03:40:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-09T22:31:52.000Z (over 11 years ago)
- Last Synced: 2024-10-04T13:14:18.098Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 121 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hacfi Object Bridge Bundle
===This bundle allows associations between different Doctrine ORMs and ODMs.
This project is at a experimental state and has limited functionality at the moment. It should work for Doctrine ORM to Doctrine PHPCR ODM, and vice versa (not ORM to ORM or PHPCR ODM to PHPCR ODM though).
The related objects are lazy-loaded if they haven’t been loaded by the object manager.
TODO:
---- [x] Mapping via annotations
- [x] Bridge to and from Doctrine ORM entities
- [x] Bridge to and from Doctrine PHPCR ODM documents
- [ ] Specify correct dependencies in composer.json
- [ ] Use loadClassMetadata event to properly map fields (so you don’t have to add the string mapping yourself)
- [ ] Add support for XML and/or YAML mapping
- [ ] Create a registry for Doctrine mappers to make it extendable (MongoDB ODM & CouchDB ODM)
- [ ] Validate the mappings and make sure the mapper specified via ```type``` is availablePlease note that the use-statement for the annotations has to be "use Hacfi\Bundle\ObjectBridgeBundle\Mapping\ObjectBridge;"
and doesn’t allow aliasing because the Doctrine’s SimpleAnnotationReader doesn’t support it. This might change in the future.Install
---app/AppKernel.php:
```php
new Hacfi\Bundle\ObjectBridgeBundle\HacfiObjectBridgeBundle(),
```app/autoload.php:
```php
AnnotationRegistry::registerFile(__DIR__.'/../vendor/hacfi/object-bridge-bundle/Hacfi/Bundle/ObjectBridgeBundle/Mapping/ObjectBridge/Reference.php');
```Example
---/src/Hacfi/AppBundle/Entity/Product.php:
```php