SUBSCRIBE VIA RSS


Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.

Topics

Stack Overflow


The old fashioned way

RECENT TUNES

  Archive for January, 2008

January 24, 2008 – 4:48pm Propel Criteria Left Join: using addJoin() and addAlias() to join a table twice

Here is a way to do left join on two columns in a table that both were foreign keys in the same table using Propel. This might happen if for example you have a table with a parent_id and a child_id in a nested set that both refer to the same table, or as an example you have a table “documentation” and each documentation can be categorized into a main category and a sub category.

What happens when you want to do a left join in your documentation query, so that if present both the related category and sub_category objects get included in the results?

$c->addJoin(DocumentationPeer::CATEGORY, CategoryPeer::ID, Criteria::LEFT_JOIN);
$c->addJoin(DocumentationPeer::SUB_CATEGORY, CategoryPeer::alias('c2', CategoryPeer::ID), Criteria::LEFT_JOIN);
$c->addAlias('c2', CategoryPeer::TABLE_NAME);

Done and done!

January 24, 2008 – 4:37pm Installing Symfony on Leopard

I’ve found the best way to install symfony on Leopard is to use the version from SVN. I find this is easy to do, and easy to update in the future. Here is a cheat sheet for those looking to get up and running with symfony on their Mac running 10.5 Leopard. More…

Posted by in  OS X Web Development   |     |  4 Comments »

January 21, 2008 – 9:50am svn, apache2, os x leopard 10.5

Mac OS 10.5 Leopard ships with Apache2 and SVN. However, if you want to keep a local svn repository and not use an external svn server (only really useful if you have projects which you will be the only developer), you have to set up the repository yourself. Here is a quick cheat-sheet to help you do just that. More…

Posted by in  OS X Web Development   |     |  10 Comments »

January 14, 2008 – 2:55pm symfony propel-load-data

Loading data from fixtures can be extremely useful to pre-populate your database so you have something to test and code with. I frequently use the propel-load-data task in two ways, the first when altering the schema, and the second to add some new data on top of whats in the database.

This will rebuild your db and model from schema.yml, insert the new structure into your db, and load data from the fixtures in /data/fixtures:

./symfony propel-build-all-load frontend

To load in additional data from a specific fixture file, you can use this command:

./symfony propel-load-data frontend dev data/fixtures/[filename].yml append
Posted by in  Web Development   |     |  3 Comments »

January 11, 2008 – 7:04pm Resize a Boot Camp Partition for Use with VMware Fusion

I’m sure this happened to a lot of us, but I started out with my Windows Boot Camp partition about 5GB. My only intention was to use it to test out our web sites in multiple windows browsers. However, after installing all of the Windows XP updates, service packs, VMware tools, multiple IEs, and Firefox, I only had about 400 MB of free space available. I finally hit the tipping point where to install new software (SPSS) I would need more space. No way did I want to go through starting from scratch. Downloading all of those windows updates took FOREVER. So, here is how I managed to resize the Boot Camp partition and still get it to work in Fusion. These steps were performed on a MacBook Pro running Leopard and a Windows XP Boot Camp partition formatted as FAT32. More…

Posted by in  OS X   |  22 Comments »