Doctrine and inheritance

While working with Symfony of course also Doctrine crosses your way. And it is really handy in my use case: I have a MySQL database that was designed 12 years ago and contains lots of Don’ts. On of these is that there are images in a table assigned to parent entities that are located in two different tables. This is controlled by one column in the image table: AssignmentType which contains TypeA oder TypeB.

I was already thinking about moving that to two image tables when I discovered Doctrine’s single table inheritance. It is made especially for that use case and works quite perfect and your application doesn’t even know about that.

Type A

Type B

Image

ImageA

ImageB

 

GD Star Rating
loading...

Symfony 2, SwiftMailer and 1und1 shared hosting

At the moment I playing around with Smfony2. One of the things I wanted to do is sending an email via form. Therefore of course I used Swift_Mailer component which worked very good in local dev environment. But after deploying to 1und1 hosted webspace I received error that neither localhost nor smtp.1und1.de could be connected to from the webspace.

After lots of research I found out that the mailserver hostname is mrvnet.kundenserver.de and then it worked.

I hope that this saves someone some hours or minutes.

GD Star Rating
loading...