|
From: Christoph S. <ch...@sc...> - 2002-10-13 16:41:39
|
Hey Gavin! Gavin King wrote: >>I think we should take the former option, one persister per class. Then >>we should be able to add new Persisters at runtime. (And change the >>field definitions of existing persisters) >> >> > >Okay, cool, but how are you going to do that without requiring a >synchronized method each time we look up a ClassPersister (which happens >very often)? > >I think you will need to think very carefully about the whole add/lookup >dynamic ClassPersister issue. It seems to be a major departure from the >current model that there is an immutable collection of immutable >ClassPersisters. > > Hadnt thought of that, thanks, Would it be possible to add my definitions to the DataStore, and then recreate or reinitialize the SessionFactoryImpl? Then I could build a guy where the user can define his new tables, and modify just the DataStore, and when he clicks on "apply", i update the db and recreate the SessionFactoryImpl. Would that work? chris |