Comments (7)
Please set 4 ` to make a pre block your question would be easiest to read.
timestamp
seems not be a good type http://www.doctrine-project.org/docs/orm/2.0/en/reference/basic-mapping.html, you've to use datetime
datetime: Type that maps an SQL DATETIME/TIMESTAMP to a PHP DateTime object.
from admingeneratorgeneratorbundle.
I am read this part of doctrine doc, but i need use PostgreSQL, in which no 'datetime' type.
Use of 2 fields: 'date' and 'time'? Not gracefully...
Especially if the entity has:
- creation date
- date of change
- date start of activity
- date end of activity
from admingeneratorgeneratorbundle.
I don t know how doctrine will store your timestamp type but you can overwrite the dbType option for the field telling at the admingenerator thats a datetime. If you find a documentation or code about doctrine and timestamp i could include this field into the guesser to determine it automatically
from admingeneratorgeneratorbundle.
New experiment:
From My.orm.yml:
...
fields:
is_published:
type: boolean
date_create:
type: datetime
date_change:
type: datetime
...
Create entity and update schema. In db fields (date_create, date_change) 'timestamp' type.
After fixtures:load in this fields i have strings in format: 2011-09-27 00:10:10.
When trying to display a list of entities that get the exception:
An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Object of class DateTime could not be converted to string in ../app/cache/dev/twig/7c/bf/b46427bd1f75816d1dedbe6c2164.php line 336") in "Admingenerated/AdminTextBundle/Resources/views/TextList/index.html.twig" at line 136.
It string (136):
{% block list_td_column_date_create %}{{ Text.dateCreate }}{% endblock %}
from admingeneratorgeneratorbundle.
I'll try this but i think thats because the list haven't recognize the type "date" and fallback to default
from admingeneratorgeneratorbundle.
Ok should work now
from admingeneratorgeneratorbundle.
Its work, thanks
from admingeneratorgeneratorbundle.
Related Issues (20)
- afe_single_upload riquiered issue HOT 6
- Doctrine ORM Manager named "default" does not exist. HOT 8
- Hardcoded id in getFilterForm HOT 2
- Excel export. Wont Work HOT 3
- Extend ExcelController from the user project ListController HOT 8
- Problem after upgrade to Symfony 2.6 HOT 1
- Problem Multi upload with single upload HOT 4
- ContextErrorException HOT 3
- GenerateAdminCommand compatible with SensioGeneratorBundle HOT 2
- updateRouting definition error with symfony 2.6 HOT 4
- Conflict with avocode/form-extensions-bundle HOT 6
- ListController::isCsrfTokenValid() changed and need 2 arguments HOT 1
- Init new tag v1.0.3 and v1.1.4 HOT 4
- Add uglifyjs and uglifycss support HOT 3
- Filters HOT 1
- Cumplidos sus requerimientos, NO logro descargar via composer...please check ! I very interesting!
- ser
- Global stopOnFail(true) should be overrideable with local stopOnFail HOT 2
- updateRouting() should be compatible HOT 1
- ODM is no longer supported HOT 1
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 admingeneratorgeneratorbundle.