Hi Sudarshana, I think the reason for the problem is that you used CayenneModeler 3.2 to generate the classes, but your runtime is Cayenne 3.1. You can use either one or the other, but the versions have to be consistent between the Modeler and runtime jars.
Hope this helps, Andrus On Aug 7, 2013, at 7:09 AM, Sudarshana Gurusinghe <[email protected]> wrote: > Hi, > > I have just started trying this using > http://cayenne.apache.org/docs/3.1/tutorial/. I have generated simple > classes. But the _Book class refers to some additional class named > Properties which is not in the library. > > See the generated code. > > package com.sg.library.domain.auto; > > import org.apache.cayenne.CayenneDataObject; > import org.apache.cayenne.exp.Property; > > /** > * Class _Author was generated by Cayenne. > * It is probably a good idea to avoid changing this class manually, > * since it may be overwritten next time code is regenerated. > * If you need to make any customizations, please use subclass. > */ > public abstract class _Author extends CayenneDataObject { > > @Deprecated > public static final String FIRSTNAME_PROPERTY = "firstname"; > > public static final String ID_PK_COLUMN = "id"; > > public static final Property<String> FIRSTNAME = new > Property<String>("firstname"); > > public void setFirstname(String firstname) { > writeProperty("firstname", firstname); > } > public String getFirstname() { > return (String)readProperty("firstname"); > } > > } > > > What am I doing wrong and where can I get the Property class ? > > Regards, > Sudarshana
