При попытке выполнить EntitySave("publications",arguments);
. Я получаю следующую ошибку.
ids for this class must be manually assigned before calling save(): publications
Я не могу понять почему. Первичные ключи моей базы данных настроены правильно, и у меня есть setter=false для этих свойств в моем CFC. Я нашел немного этой ошибки, выполнив поиск в Google, но, похоже, ничто не указывает на то, что вызывает мою проблему здесь.
Вот мои CFC. Любые указатели на то, что я могу делать неправильно, приветствуются. Заранее спасибо!
Публикации.cfc
component persistent="true" table="publications"
hint="Publications"{
property name="id" fieldtype="id" setter="false";
property name="typeid" omrtype="int";
property name="name" ormtype="string";
property name="dateScheduled" ormtype="date" ;
property name="tstamp" ormtype="date";
property name="Article" fieldtype="one-to-many" cfc="publicationArticles" fkcolumn="publicationid";
}
публикацииСтатьи.cfc
component persistent="true" table="publicationArticles"
hint="Publications"{
property name="id" fieldtype="id" setter="false" ;
property name="typeid" ormtype="int";
property name="title" ormtype="string" ;
property name="status" ormtype="boolean";
property name="publication" fieldtype="many-to-one" cfc="publications" fkcolumn="publicationid" ;
}
публикацииTypes.cfc
component persistent="true" table="publicationTypes"
hint="Publicatin Type - Lookup"{
property name="id" fieldtype="id" setter="false" ;
property name="description" ormtype="string";
property name="publications" fieldtype="one-to-many" cfc="publications" fkcolumn="typeid" ;
}