Dave wrote:
On 1/11/07, Mitesh Meswani <[EMAIL PROTECTED]> wrote:
It might not be easy to entirely get rid of PersistentObject because of
the way rest of the roller code is written. The code calls
strategy.store() on both new and managed object. I went down the path to
remove reference to PersistentObject while implementing
JPAPersistenceStrategy but had to revert back. See comments in
JPAPersistenceStrategy#store for more information.
Yes, it will require a fair amount of code changes but I think it's
the right thing to do and I've got time to tackle it now so I'm going
to take shot.
I haven't looked at it very carefully, but I would think that the main
culprits are the struts actions which often create a new pojo and load
it with data from the submitted form (including id) rather than querying
for an object and then mutating it's properties. It'll be a fair amount
of work to tidy that up, but it's important.
-- Allen
- Dave
-Mitesh
Dave wrote:
> I'm working with Craig and Mitesh this week, helping to get their JPA
> implementation up and running. I'm running into some issues:
>
> 1 - The JPA implementation doesn't include the new Planet interface
> 2 - The Planet POJOs no longer extent PersistentObject
> 3 - The Roller POJOs still do
>
> Working on code for #1 I've found that #3 makes things a little
> painful. So in my workspace now, I'm working on eliminating the
> PersistentObject class entirely and replaced the kludgey store() and
> remove() code in HibernatePersistenceStrategy with nice clean
> implementations (like the one in Planet's strategy).
>
> Any objections to eliminating PersistentObject?
> Any other ideas or suggestions?
>
> - Dave