Pre-persist not firing

From: John Armstrong (siberia..mail.com)
Date: Tue Dec 30 2008 - 11:02:37 EST


This is really basic but I am a bit sick and am just not finding my
answer (thats my excuse, sick..)

In my map I have this (generated via M5 Modeler):

       <obj-entity name="Company" className="com.printgate.model.Company"
dbEntityName="COMPANY">
               <obj-attribute name="companyid" type="java.lang.String"
db-attribute-path="COMPANYID"/>
               <obj-attribute name="isactive" type="boolean"
db-attribute-path="ISACTIVE"/>
               <pre-persist method-name="generateCompanyID"/>
       </obj-entity>

In my com.printgate.model.Company object I have this method:

       public void generateCompanyID(){
               System.out.println("In generate");
       }

I call it like this :

       public BigTest(){
               context = DataContext.createDataContext();
               theCompany = (Company)
context.newObject(com.printgate.model.Company.class);
               context.commitChanges();
       }

The object is created in the datastore but my pre-persist never fires.

This is M5. I also rolled back to M4 with the same problem so I am
sure its something obvious that i am missing in how I wire it all
together (although it does work in another project I have).

Thanks
John-



This archive was generated by hypermail 2.0.0 : Tue Dec 30 2008 - 11:03:10 EST