It is off topic, right? I was suspecting that... The thing is that being a newbie, it is difficult for me to tell when Hibernate ends and GWT begins. Looking around i realized that annotations are just a great Hibernate feature and all questions regarding that matter should be directed to the propper groups but i had already sent the "distress call" when i found out hehe Whenever a Spring or Hibernate issue arises i ask myself is this a Hibernate or Spring issue? or is a Hiberante or Spring being used with GWT issue? thats another reason why i used this group for my post. Anyway, its working, so thanks a million!
Will be more careful with the off-topicness from now on ;) 2009/5/28 eggsy <[email protected]> > > Hi Rafael, > > Its somewhat off the topic of GWT but the inheritance you wish to map > is not a problem with Hibernate annotations. > > Using an example the class HumanResource below inherits from the > Resource class: > > @Entity > @Table(name = "resource") > @Inheritance(strategy = InheritanceType.JOINED) > public class ResourcePOJO implements Serializable > { > //// Your annotated getters and setters > } > > @Entity > @Table(name="human_resource") > @Inheritance(strategy = InheritanceType.JOINED) > @PrimaryKeyJoinColumn(name="resource_id") > public class HumanResourcePOJO extends ResourcePOJO implements > Serializable > { > //// Your annotated getters and setters > } > > Notice the inheritance annotation and the PrimaryKeyJoinColumn > annotation. > > Eggsy > > On May 27, 4:09 pm, Rafael Barrera Oro <[email protected]> wrote: > > Sorry for taking so long in replying and thank you for your answers. I am > > trying to map the following relationship. > > > > I have a contact table which holds common data such as name, last name, > > observations, etc and i have a employee table which inherits all the > fields > > from the contact table and adds the employeenumber field. So, it will be > a > > simple case of inheritance with a table per sublass mapping > > > > Thanks in advance! > > > > Rafael > > > > 2009/5/21 eggsy <[email protected]> > > > > > > > > > Hi Rafel, > > > > > Yeah you can do everything in Hibernate Annotations its really quite > > > powerful. We have moved to using it fully now instead of mapping > > > files. > > > > > Using the mapping file to simply hold our queries. > > > > > What kind of relationship are you trying to map? > > > > > Eggsy > > > > > PS. Paul - yeah that framework does seem to be plugged quite a > > > lot..... ;) > > > > > On May 21, 7:22 am, George Georgovassilis <[email protected]> > > > wrote: > > > > And Jim, no, we don't find Hibernate hard to use, especially since > > > > it's a quasi-standard;-) > > > > > > On May 20, 7:56 pm, Jim <[email protected]> wrote: > > > > > > > Rafael, > > > > > > > If you find Hibernate is difficult to use, you may try Dreamsource > ORM > > > > > for your application. You can find an GWT example inhttp:// > > >www.gwtorm.com/mail/Mail.html. > > > > > > > Jimhttp://www.gwtorm.comforGWTORMhttp:// > > > code.google.com/p/dreamsource-orm/ > > > > > > > On May 20, 12:52 pm, Rafael <[email protected]> wrote: > > > > > > > > Hello everyone! > > > > > > > > I have the following problem and was hoping you guys could > help me > > > > > > out. I have the need to implement a relation inheritance (table > per > > > > > > subclass) so i searched the hibernate documentation. > > > > > > The thing is that i am using a project structure which i took > from > > > > > > a tutorial i found, and i have the following configuration files: > > > > > > > > applicationContext.xml (Spring stuff i suppose) > > > > > > > > hibernate.cfg.xml (mappings) > > > > > > database.hbm.xml (hibernate query definitions) > > > > > > > > My question is where should the code to define complex relations > > > > > > should go, hibernate.cfg.xml or database.hbm.xml? > > > > > > > > Is it possible to take care of everything with annotations > > > > > > (eliminating the need to change xml files)? > > > > > > > > Thanks in advance y'all! > > > > > > > > PD: Thank you Eggsy for your tutorial on GWT, Hibernate ans > Spring > > > > > > combined! very enlightning :) > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
