I am working in Zend framework using Doctrine. If I want to write business logic in model function, how can I retrieve table record from within model function using Doctrine.
I have a blog and tag module. While adding a blog, I can give tags in comma separated fashion. I can save the blog record from controller. When saving the tags, I need to check if those tags already exists in table. For that, I can write a function in model and call it from the controller. This function will check if tag is present. If it is already there, it will return the tag id or it will save the tag and return the new id.
Now my question is how can I retrieve tags table record from model function. Please help me.