Yeah me neither. I'd like to be able to extend those classes to add different methods (for persistance) but it doesn't look like extending these things would work. I'd have to contain the xmlbean in another class, expose all the getters and setters in the new class and then add my methods to the new class in order for it to be usable.
Can someone let me know if there's another way to do this? Right now XMLBeans is really good at being a VO and unmarshalling to and from XML but I have no way to put business operations on these objects without using containment. I'd like to extend or implement different interfaces on these guys w/o containment.
Shaun.Farrugia. . [EMAIL PROTECTED]
perm. desk.734.887.2148. . .cell.313.363.5006
aim.dier0b0t . . .
"Radu Preotiuc-Pietro" <[EMAIL PROTECTED]>
10/18/2005 02:46 PM
|
|
I know of the difficulty of using hibernate with XmlBeans. I remember that someone researched some option that hibernate had to use factories instead of default constructors, but I don't know what the answer was.
You can check out our Velocity sample http://xmlbeans.apache.org/samples/vxsdb.html which creates a SQL data model from an xsd Schema.
Other than that, I would be interested too if anyone has found anything interesting in this area.
Oh, about extending the implementation classes: how would tell XmlBeans to create one of your implementation classes instead of the ones that it knows of? I don't think that could work.
Radu
- -----Original Message-----
From: Shaun Farrugia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 13, 2005 11:34 AM
To: XMLBeans
Subject: Persisting XMLBeans to DB
Looks like my original message was null - sorry about that everyone.
I'm looking to implement some sort of OR layer using the generated XMLBeans as our VO objects.. What layer are you all using? I'm seeing that hibernate isn't necesarrily usable because of the XMLbean lack of default constructor.
Would extending the implementation and adding a default constructor and then persisting the extended implementation be a decent option? I'd hate to talk to implementation classes but i see no other option
Shaun.Farrugia. . [EMAIL PROTECTED]
perm. desk.734.887.2148. . .cell.313.363.5006
aim.dier0b0t . . .


