Comments (3)
I can see the property count
inside the ODM Mapping of Resources/config/doctrine/BaseCategory.mongodb.xml
:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mongo-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/orm/doctrine-mongo-mapping.xsd">
<mapped-superclass name="Sonata\ClassificationBundle\Document\BaseCategory">
<field name="name" type="string" fieldName="name" />
<field name="enabled" type="boolean" fieldName="enabled" />
<field name="slug" type="string" fieldName="slug" />
<field name="description" type="string" fieldName="description" />
<field name="count" type="int" fieldName="count" />
<field name="createdAt" type="timestamp" fieldName="createdAt" />
<field name="updatedAt" type="timestamp" fieldName="updatedAt" />
<lifecycle-callbacks>
<lifecycle-callback type="prePersist" method="prePersist"/>
<lifecycle-callback type="preUpdate" method="preUpdate"/>
</lifecycle-callbacks>
</mapped-superclass>
</doctrine-mongo-mapping>
Since we extended our bundle we override some mapping, but only the ORM:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<!--
This file has been generated by the EasyExtends bundle ( https://sonata-project.org/easy-extends )
References :
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
-->
<entity
name="Application\Sonata\ClassificationBundle\Entity\Category"
table="classification__category"
repository-class="Doctrine\ORM\EntityRepository">
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
from sonataclassificationbundle.
Got the same error and additionally a "Property slug does not exist" error.
Got a fix for it:
Adding "$slug" into Model/Context.php and adding "$count" into Model/Category.php will fix this issue.
from sonataclassificationbundle.
So what's the right solution? Remove these properties from xml or add these properties to Model?
from sonataclassificationbundle.
Related Issues (20)
- Context is required when creating a tag, but this isn't enforced at database level HOT 4
- Slugify 3.0 HOT 1
- Associations inconsistency for tag, collection and category towards context HOT 3
- Error: Method treeAction does not exist HOT 7
- sonata-project/classification-bundle 4.x-dev requires sonata-project/admin-bundle ^3.31 HOT 1
- duplicated Entity HOT 22
- Unable to load the twig extension
- Remove id from model classes HOT 3
- Problem with ClassificationBundle [category] on PROD env. HOT 1
- Empty context causes infinite loop
- Context::__toString() must return a string value HOT 1
- Make admin dependency optional
- ManagerRegistry HOT 1
- Cannot override final method HOT 2
- Creating a category is impossible in the fresh installation with category table empty. HOT 7
- Upgrade migration from 4.x to 5.x HOT 2
- [5.x] CategoryAdmin list view does not have edit button because default route is now show HOT 5
- [5.x] Cannot create context with ContextAdmin HOT 5
- [5.x] Admin routes are "ugly" after upgade to SonataAdmin 4 HOT 3
- [5.x] CategoryAdmin Tree view is not working HOT 5
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 sonataclassificationbundle.