[FLOW3-general] Diffrent packages with simillar models + Doctrine

Regine Rosewich regine.rosewich at hoellenberg.biz
Mon Mar 21 16:25:58 CET 2011


Hi David,

you're perfectly right. I missunderstood what you wanted. To solve your
problem you should maybe read the Documentation of the Doctrine2 ORM,
especially the chapter about mapping tables with YAML.
(www.doctrine-project.org/docs/orm/2.0/en/reference/yaml-mapping).

Regine

-----Ursprüngliche Nachricht-----
Von: flow3-general-bounces at lists.typo3.org
[mailto:flow3-general-bounces at lists.typo3.org] Im Auftrag von Dawid
Pacholczyk
Gesendet: Montag, 21. März 2011 15:45
An: flow3-general at lists.typo3.org
Betreff: Re: [FLOW3-general] Diffrent packages with simillar models +
Doctrine

Hello Regine,
  you can have problem like this in OOP. Post for Blog and Forum don`t 
need to be simillar. Than extending one from other or reusing one is 
wrong. As an example take JAVA. You can often find same name of 
class/object in diffrent Packages. Thats why there are Packages.

Simillar here. I want to create and application where I can use diffrent 
Packages. Sometimes I can have very diffrent objects but with the same 
name. I`m missing some kind of prefix: key_model. With prefix the 
problem wouldn`t exists.

Thank you Regine but I`m not sure you understood my problem well enough. 
Your case isn`t answer for my questions :(

Best regards,
Dawid Pacholczyk


W dniu 2011-03-21 15:11, Regine Rosewich pisze:
> Hi Dawid,
>
> if you internalise the object oriented paradigm, you won't have any
problem
> because you would reuse the first post object for the second usage and
only
> extend it if necessary. The extension would cause the Doctrine2
Persistence
> to extend the 'post' table according to the extended object. If you really
> worked with two post objects within the same Application-Domain Doctrine2
> should throw an error (I did not yet test such a constellation). The only
> way to handle such a situation would be to work with two Settings.yaml,
each
> in the Configuration folder of the particular application. But then it
would
> be a little complicated to merge the data of the two databases if
necessary.
>
> To cut the chase: I would either try to reuse the first post-class (My
> preference) or name the second post-class or both post-classes differently
> (e. g.<Application1>_post and<Application2>_post).
>
> Regine
>
>
> -----Ursprüngliche Nachricht-----
> Von: flow3-general-bounces at lists.typo3.org
> [mailto:flow3-general-bounces at lists.typo3.org] Im Auftrag von Dawid
> Pacholczyk
> Gesendet: Montag, 21. März 2011 14:44
> An: flow3-general at lists.typo3.org
> Betreff: [FLOW3-general] Diffrent packages with simillar models + Doctrine
>
> Hello List,
>    for example I want to create a sociall application that is supporting
> Blog and Forum. Both Packages will contain DIFFRENT Post models.
> Doctrine is creating a table with the same name as model. How will it
> act if I`ll have to packages with Post model ?
>
> Best regards,
> Dawid Pacholczyk
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>
>

_______________________________________________
FLOW3-general mailing list
FLOW3-general at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general




More information about the FLOW3-general mailing list