ORM EntitySave() Error
Hi All
For the life of me I can't seem to escape from this error when using EntitySave():
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'UserType'.
Normal cfqueries work okay, so I know my cfuser is fine. I know it's picking up the correct schema because if I change the table name I get an an error saying it is undefined in this schema.
Heres how I'm doing the EntitySave():
| userType = EntityNew("userType"); |
| userType.setuserTypeTag('test'); | ||
| userType.setuserTypeName('test'); | ||
| userType.setdateCreated(Now()); | ||
| userType.setdateModified(Now()); | ||
| userType.setmodifiedBy('2'); | ||
| EntitySave(userType); |
Here is the UserType.cfc
component persistent="true" table="UserType" schema="security" output="false"
{
/* relationships */
property
name = "User"
type = "array"
fieldtype = "one-to-many"
cfc = "User"
;
/* properties */
property name="userTypeId" column="userTypeId" type="numeric" ormtype="int" fieldtype="id" generator="increment";
property name="userTypeTag" column="userTypeTag" type="string" ormtype="string";
property name="userTypeName" column="userTypeName" type="string" ormtype="string";
property name="dateCreated" column="dateCreated" type="date" ormtype="timestamp";
property name="dateModified" column="dateModified" type="date" ormtype="timestamp";
property name="modifiedBy" column="modifiedBy" type="numeric" ormtype="int";
}
Thanks,
Tim