[FLOW3-general] Best Practice to check for references before removing objects
Kerstin Huppenbauer
kerstin.huppenbauer at die-digiparden.de
Mon Feb 20 16:52:52 CET 2012
Hi Bastian,
>
> This seems very hacky to me to be honest ;)
> If your domain model is not too complex, why not simply add the
> respective getters to the parent objects, like:
>
> Blog::hasPosts()
> Post::hasComments()
>
thx for your answer.
right, this is a very quick & dirty hack, therefore i asked for better
solutions :-)
i think my domain model is as complex as it has to be ;-)
e.g. i have a domain "market" which is referenced in 10-12 other
domains. the other domains have at least 2 - up to 6 references.
So i was afraid this would make it more complex as it has to be -
only to check if an object could be deleted or not.
I'll have a look at it...
cheers
Kerstin
More information about the FLOW3-general
mailing list