I use sonata admin project. It's admin for symfony2. I have two admin 
modules. Modules depends on entities. First module shows data from my 
table. Second module shows only few columns from the same table. Moreover 
it shows data from another database, which is not created for doctrine.

What I've tried:
1. I made one entity and change metadata in loadClassMetadata event. After 
that I used postLoad event to get and process data from 'non-doctrine' 
database and fill entity. It works without cache, as I wrote above.
2. Single Table inheritance. It's creating column in database after which 
doctrine chooses rows but I need the same rows in both modules.
3. Creating another entity with the same table name, obviously case problem 
with update database schema.

Creating entity and inheriting from existing entity could be a solution. I 
would have two class and doctrine cache them separately. I don't know 
whether it's possible at all.
I need metadata because sonata depends on it.

Sorry for my english but I hope it's readable..

W dniu środa, 22 października 2014 09:56:04 UTC+2 użytkownik Jàπ (Jasper N. 
Brouwer) napisał:
>
> Hi Wiktor, 
>
> You could turn that question around: 
> If you do need to change the mappings _at runtime_, why do you want to 
> cache it? 
>
> Could you perhaps describe the use-case you have? 
>
> -- 
> Jasper N. Brouwer 
> (@jaspernbrouwer) 
>
>
> On 22 October 2014 at 09:03:52, [email protected] <javascript:> (
> [email protected] <javascript:>) wrote: 
> > If loadClassMetadata event isn't made for metadata modification at 
> runtime 
> > so what is it used for? 
> > 
> > -- 
> > Cheers, 
> > Wiktor 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to