ids for this class must be manually assigned before calling save(): tblName
Hoy folks,
Long time lurker first time caller.
I've hit an issue with ColdFusion ORM that I just can't figure out. Here's the situation.
1) I have a database procedure that I use to create tables with a number of columns that are common to all the tables. These columns are mapped to the persistent component.
2) The code to generate the keys looks like this (wod= word of the day):
CREATE TABLE [dbo].[tblName](
[idx] [int] IDENTITY(1,1) NOT NULL,
[id] [varchar](36) PRIMARY KEY NOT NULL,
ALTER TABLE [dbo].[tblName] ADD CONSTRAINT [DF_tblName_id] DEFAULT (newid()) FOR [id]
3) The rest of the columns mapped to given entity are generated by ORM.
4) The code for mapping these fields is...
property name="idx" fieldtype="column" ormtype="int" generated="insert" setter="false";
property name="id" fieldType="id" length=36 generated="insert" setter="false";
5) My goal is to get the id property to be populated on save() from the database.
6) I get this error, no matter what combination of attributes I try for the id property:
"ids for this class must be manually assigned before calling save(): tblName"
I'm at a total loss. Can you please help a man out?
Thanks much,
JH
