Try setting generator="native" instead. On Dec 3, 2011 9:10 PM, "Bobby Hartsfield" <bo...@acoderslife.com> wrote:
> > I've finally been playing around with ORM lately and I've hit an issue that > I'm having a hard time finding answers for on Google. Hopefully someone > here > knows what the deal. > > > > Below is a very basic "person" app with one component (outside of app.cfc) > and a small index.cfm > > > > The error I'm seeing is: > > this id generator generates long, integer, short > > Root cause :org.hibernate.id.IdentifierGenerationException: this id > generator generates long, integer, short > > > > Basically, I read a xls doc of first and last names and (attempt to) load > it > into a tblPeople table. > > > > The above error happens in inde.cfm when entitySave(obj) is triggered. I > can > comment out " entitySave(obj);" and not get any errors. > > > > There are only about 3000 records in people.xls and tblPeople doesn't exist > yet. > > > > It is a new, basic install of CF9 on server 2003. > > > > This worked earlier but I was using the old style <cfcomponent /> tags in > person.cfc > > > > hopefully I'm just missing something obvious to someone else. > > > > Any help appreciated here. > > > > Thanks > > > > ---INDEX.CFM > > > > <cfset ormReload() /> > > <cfspreadsheet action="read" src="#expandPath('.')#\people.xls" > query="sheet" headerrow="1" /> > > > > <cfloop query="sheet" startrow="2"> > > <cfscript> > > obj = EntityNew("person"); > > > > obj.setPersonFname(sheet["personFname"][sheet.currentRow]); > > obj.setPersonLname(sheet["personLname"][sheet.currentRow]); > > > > entitySave(obj); > > </cfscript> > > </cfloop> > > > > > > > > > > ---PERSON.CFC > > component persistent="true" table="tblpeople" > > { > > property name="personId" fieldtype="id" > generator="increment"; > > property name="personFname"; > > property name="personLname"; > > } > > > > > > > > > > > > > > ---APPLICATION.CFC > > component > > { > > this.name = "personTest"; > > > > this.ormenabled = "true"; > > this.datasource = "peopleTest"; > > this.ormsettings={dbcreate="update", logsql="true"}; > > this.ormsettings.savemapping = false; > > > > this.clientmanagement="false"; > > this.sessionmanagement="true"; > > this.sessiontimeout="#createtimespan(0,0,1,0)#"; > > this.applicationtimeout="#createtimespan(0,0,1,0)#"; > > } > > > > > > .:.:.:.:.:.:.:.:.:.:.:. > > Bobby Hartsfield > > http://acoderslife.com > > http://cf4em.com > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348945 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm