cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Armstrong" <>
Subject pre-persist not firing
Date Tue, 30 Dec 2008 00:51:34 GMT
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"
		<obj-attribute name="companyid" type="java.lang.String"
		<obj-attribute name="isactive" type="boolean" db-attribute-path="ISACTIVE"/>
		<pre-persist method-name="generateCompanyID"/>

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);

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,


View raw message