I can't get a callback to work on my entity superclass.

I've mapped it like this:

  <mapped-superclass class="org.permacode.atomic.domain.AtomicEntity"
    access="FIELD">
    <pre-persist method-name="prePersistCallBack" />
    <attributes>
      <basic name="ownerId">
        <column name="OWNER_ID" />
      </basic>
      <basic name="created">
        <column name="CREATED" />
        <temporal>DATE</temporal>
      </basic>
      <basic name="modified">
        <column name="MODIFIED" />
        <temporal>DATE</temporal>
      </basic>
      <version name="version">
        <column name="VERSION" />
      </version>
    </attributes>
  </mapped-superclass>


The method prePersistCallBack() is on the superclass:

    public void prePersistCallBack()
    {
        this.modified = new Date();
        logger.info("doing prePersistCallBack() - " + this + " - modified="
            + this.modified);
    }

I see no logging and I see the SQL statement contains the untouched modified 
value.

Is there anything extra in the mapped subclass entities which is needed for callbacks?

Thanks
Adam

Reply via email to