Groups
Sign in
Groups
symfony-cmf-users
Conversations
About
Send feedback
Help
How do I get the creation date of a phpcr odm doc?
39 views
Skip to first unread message
Bruno Reis
unread,
Dec 11, 2014, 3:18:13 PM
12/11/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to symfony-...@googlegroups.com
On phpcr browser, I see that there is a "jcr:created" information on the phpcr level.
Is there a way to retrieve this info from a odm doc?
David Buchmann
unread,
Dec 11, 2014, 6:45:24 PM
12/11/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to symfony-...@googlegroups.com
hi,
you can do this:
* @Document(
* mixins={"mix:created", "mix:lastModified"}
* )
and then map the properties jcr:created and jcr:lastModified onto fields
/**
* @Date(property="jcr:created")
*/
private $created;
not sure where in the doc we could mention this, maybe at
http://docs.doctrine-project.org/projects/doctrine-phpcr-odm/en/latest/reference/annotations-reference.html#date
?
or as a cookbook example, explaining that you need to use the mixins and
how to map the properties, and that the dates then are automatically
updated by jackalope.
cheers,david
> --
> You received this message because you are subscribed to the Google
> Groups "symfony-cmf-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
symfony-cmf-us...@googlegroups.com
> <mailto:
symfony-cmf-us...@googlegroups.com
>.
> For more options, visit
https://groups.google.com/d/optout
.
--
Liip AG // Agile Web Development // T
+41 43 500 39 80
CH-8005 Zurich // PGP 0xA581808B //
www.liip.ch
Reply all
Reply to author
Forward
0 new messages