symfony - Doctrine2: Entity with many types of "Parent" Entity -
new doctrine/symfony. have db structure need looking recommendations structure. have think need single entity able "child"(manytoone/manytomany) of multiple types of entities.
first example have account has both "projects" , "employees". have "documents" linked either project or employee. single "document" linked multiple projects and/or employee. (manytomany)
second use in project log table. have log linked account,project, employee, or document. simple (log)manytoone(object). thinking maybe sti work here. how relationships? each "object" own field on log table (accountid, projectid, employeeid, etc)? thinking better of have 1 field on log called "parentid" new object based of "type" field. thoughts?
thanks in advance!
Comments
Post a Comment