On Feb 8, 2013, at 10:08 , Milos Janjic <milosh...@gmail.com> wrote:

> Hello everyone,
> 
> my main question here what is best practice for placing common entities (see 
> example below)
> 
> We have UserBundle and User entity in this bundle.
> Also we have CompanyBundle and Company entity in this bundle.
> So, now we are need to create Country entity that is system wide (User and 
> Company can set their country). What is the best place for putting this 
> entity?
> 
> For now I can only see one solution... to create one more bundle (lets call 
> him CommonBundle) and put all entities that are common for all other bundles. 
> Is this good thinking?

there is no one size fits all solution here. i tend to assign 
entities/documents to the bundle that feels to have the strongest relationship. 
however f.e. i have done some multi kernel apps where f.e. i had a separate 
kernel for my migrations and admin etc. where it was more practical to have 
them all in one bundle.

speaking of which there are also people that create their entire app inside a 
single bundle.

finally there is no need to put entities/documents into a bundle. they can also 
be mapped if they are in any other directory.

regards,
Lukas

-- 
-- 
If you want to report a vulnerability issue on Symfony, please read the 
procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Symfony developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to symfony-devs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to