Just a quick little method I thought I would share with everyone. I was working with a ColdFusion ORM entity and I needed to know what field was the primary key. Turns out you can tap into the Session Factory to find this out. This You can also find out the type of the primary key.