House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

ORM/Hibernate generator issue

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bobby Hartsfield
12/03/2011 10:10 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Matt Quackenbush
12/03/2011 10:15 PM

Try setting generator="native" instead. On Dec 3, 2011 9:10 PM, "Bobby Hartsfield" <bobby@acoderslife.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bobby Hartsfield
12/03/2011 10:23 PM

Thanks Matt. I swear I did try that earlier but I just tried it again to make sure I didn't typo it or something earlier and it got past the error. Today has been one long caching nightmare. Thanks! .:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com Try setting generator="native" instead. On Dec 3, 2011 9:10 PM, "Bobby Hartsfield" <bobby@acoderslife.com> wrote: > > I've finally been playing around with ORM lately and I've hit an issue that ----- Excess quoted text cut - see Original Post for more ----- exist ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference