0

Using this as an example: https://cayenne.apache.org/docs/3.0/modeling-single-table-inheritance.html.

I have an ObjEntity called Book. I have changed the Java Type for one of the attribute to use JodaTime's DateTime class. The superclass _Book() is generated correctly with get/set method that uses DateTime. For example: public void setRelease(DateTime release)

I have another ObjEntity call EBook that sets the superclass to Book() (not the same as the abstract _Book()) . In the class _EBook, I see the same method setRelease with a different signature. For example: public void setRelease(Date release)

How do I make the Modeler not create these methods?

Tuan
  • 1,476
  • 13
  • 23

1 Answers1

0

This shouldn't happen normally. Class generator does not generate setters/getters for superclass attributes in subclass. Could it be something the DataMap XML? The most likely cause is a "release" ObjAttribute declaration in an EBook entity that "shadows" "release" ObjAttribute of the super entity. If so, you should manually remove it from the XML, and redo the classes.

andrus_a
  • 2,528
  • 1
  • 16
  • 10
  • Thanks andrus_a! I went through the DataMap XML to find those attributes under the tag and removed them. That worked perfectly. – Tuan Apr 11 '14 at 17:57