RE: [Hibernate] Hibernate and EMF integration

2005-06-06 Thread Mike Kanaley
Thanks for the tip on PersistentCollection.setOwner. That will likely work. As for "EMF persistence", let me try to explain how I think it differs from Hibernate (including XML support). I view Hibernate's XML support as serialization and not persistence. IMO Eclipse's raison d'tre is to provid

Re: [Hibernate] Hibernate and EMF integration

2005-06-06 Thread baliuka juozas
This is one of examples ("containment" with "opposite" association), but generated code depends on model too, "reference" will be generated in different way and you need to know model to persist it in the right way (generated code has meta information). It is not a good idea to asume generated cod

Re: [Hibernate] Hibernate and EMF integration

2005-06-06 Thread Max Rydahl Andersen
And this code is auto-generated into your "domain" classes ? Damn - EMF is way more intrusive than I thought. But anyhow - "elements" is some field, right ? Then hibernate can set it! Regarding getting the "owning element" into the collection. Can only tell that PersistentCollection.setOwner()

Re: [Hibernate] Hibernate and EMF integration

2005-06-06 Thread baliuka juozas
It looks something like this: public EList getElements() { if (elements == null) { elements = new EObjectContainmentWithInverseEList(MyElement.class, this, MyGenPackage.ELEMENTS_FEATURE_ID, MyGenPackage.PARENT_FEATURE_ID); } return elements; } This stu