Hello,
I'm using MyEclipse 5.0GA with Eclipse 3.2.1. I'm not a seasoned vet when it comes to Hibernate or MyEclipse. I am just learning and evaluating the software for future use in the not so distant future.
It was my understanding that MyEclipse was a way of working with Hibernate in an easier fashion. It was also my understanding that the two together were able to generate base classes (in Java, ofcourse) and tables (in the Database), and that it would also update both sides as you modified the XML file.
So, with that little bit stated and as the subject suggests.. I'm having a problem with the Generated POJOs feature of MyEclipse. This feature seems relatively new, and I can't seem to find much about it on Google except that it exists. In my project, I've setup my hibernate.cfg.xml, I've imported Hibernate support using the MyEclipse menu, and I've setup a Honey.hbm.xml file based on a Hibernate/MyEclipse tutorial I found.
When I right click on the Honey.hbm.xml file and select MyEclipse -> Generate POJOs, I kept the name it chose, and removed the option for creating an abstract class just for simplicity. After pressing "Next," there's a smile for a second, and then I realize the generated class has an error. Here's the class signature it generated:
| Code: |
| public class Honey extends Honey implements java.io.Serializable { |
An obvious problem for Java, but as a collegue pointed out, it may not be a bug. I'd be glad to provide any source one would need to understand this further. I was just holding off on that so as to not post a ridiculously overwhelming amount of text. = )
So, the question: Is that a glitch or is it intentional whereas the "extends <class>" is being generated from a problem in one of my XML files? Side note: if I remove the "extends Honey," the code works fine. AND this "error" occurs whether I generate the Abstract class and this one, or if I just create the base class.
Any help would be appreciate. Till then, take care. = )