Friday, February 17, 2012
How to set up ID columns in ColdFusion 9 ORM that will work on MSSQL, MySQL and ORACLE
ColdFusion 9's ORM is the bees-knees in my opinion. It allows extremely rapid development and refactoring.
If you happen to be a lucky developer working on a green field project where you are designing your DB and want ColdFusion entities to work across the major DB's such as MSSQL, MySQL and ORACLE you'll want to set your entity ID columns like this:
Using this approach will make all the underlying DBs assign the IDs. Setting the ORMTYPE to long is the attribute and value that allows this to work on ORACLE as well.