Archive for the 'HowTos' Category

Setting Up Helio’s Samsung Fin with Mac OS X (part 1)

So I’ve recently signed up with Helio as my primary cell phone service. And, even though Helio’s Samsung phones have about the worst compatibility and support for Mac OS X, I’m stubborn and I’ll be damned if I’m not gonna use my new Fin with my Mac. This article details some of the hurdles I had to overcome to get my data flowing from my MacBook Pro to my Helio Fin. Hopefully it’ll save you some time. This first part covers bluetooth pairing and transferring of contacts from a Mac to the Helio Fin.
Continue reading ‘Setting Up Helio’s Samsung Fin with Mac OS X (part 1)’

HowTo: CakePHP 1.2 Model ORM Inheritance Hack

[Edit: Fixed a bug in model to filter by subtype]
[Edit: again]
[Edit: Oops. I forgot to add the cvar function!]
[Edit: Fixing more bugs in the query generation. Add DboSource mod. Give me a break. it's my first week using CakePHP]

The Problem

Simple CakePHP ORMCakePHP is fairly good as an ORM Framework. You create database tables and it automagically maps them into Model classes for use in a nice MVC application. And, in most cases, this is just fine for most database tables. Relations get mapped and linked, things are peachy. But Cake has it’s shortcomings. The ORM in Cake is nowhere near as capable as say, Hibernate, and in particular (at least as of 1.2r5875) Cake’s Model class mapping does not support inheritance.Inheritance ORM Case
Hopefully Cake developers realize this is a deal breaker for a lot of people. For one of my own projects at least, I needed ORM inheritance and for reasons I won’t go into here, I had to use Cake.

The Solution

What I came up with is very much a hack. It involves modifying model.php (internals of Cake proper). If you’re doing a one off project, this is fine, but be warned that if you implement this hack, upgrading cake won’t be a simple matter of moving your app directory.
Anyhow, it works like this… Continue reading ‘HowTo: CakePHP 1.2 Model ORM Inheritance Hack’