Perhaps have a doctrine entity of 'userDedicatedDatabase'

with enough credentials and crap declared in the entity that you can
create/instanciate a database handle (like the ones in databases.yml)
from the values of entity.


the entity can also have business model methods to create the users
database if it doesn’t exist. (like when the user registered you can
create his db using APIs you implement on the userDedicatedDatabase or
whatever you choose to call it)


Could that work. So a table of database references, with the user id
as a foregn key in the table so you know which user the
userDedicatedDatabase is for.


On Feb 17, 11:41 am, Timo <hoen.t...@googlemail.com> wrote:
> Hello,
>
> i work at a software developement office in germany.
> i developed a software named "responsemanager" for our customers.
> it's got an online archive, data-export, statistics and so on (for our
> customers only, so no demo).
>
> For the new version of this software we want to use symfony as
> framework.
>
> Getting the authorization for the users done, wasn't that difficult.
> But now i'm standing in front of a whole new problem.
>
> Situation:
>     Every Customer has his own datatable in a  database (e.g called
> "dat_10000", "dat_2xxxx" ) (different names!)
>     Every Table has some fields for our internal processes ( e.g
> export_date, export_user.. flag_value ).
>     Every Customer has also, Modules (Archiv, Export, Statistics, and
> so on).
>
> Example:
> Customer Timo:   -  has   - Modules: Archiv,Export -- Table:
> dat_10044.
> Customer Somebody -- has -- Modules: Statistics, Overview -- Tables:
> dat_xxx AND dat_22
>
> i realised this with  3 Tables,
>
> Users(username,pw ... so on), Tables (real_name_in_database, id, other
> fields ) and a join table called TableAccess ( user_id , table_id ).
>
> Getting the Relations for different users is no problem.
>
> But querying the REAL databases is.. because there is no generic
> "Model" for these Tables, and i do _not_ want to create a whole new
> model definition for each table that will be generated in the future.
>
> Is there a way to achieve my needs using doctrine or do i'll have to
> fallback to raw sql queries ( e.g SELECT * FROM dat_10000 WHERE flag
> <> 999 )

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.

Reply via email to