Re: Using my own ObjectContext class

2017-02-09 Thread Hugi Thordarson
Thanks Nikita! - hugi > On 9. feb. 2017, at 10:21, Nikita Timofeev wrote: > > Hi Hugi, > > The "official" way to override newContext() result is to implement > your own ObjectContextFactory and inject it via custom Module. > > You can do it like this: > > ServerRuntime cayenneRuntime = Serv

Re: Using my own ObjectContext class

2017-02-09 Thread Nikita Timofeev
Hi Hugi, The "official" way to override newContext() result is to implement your own ObjectContextFactory and inject it via custom Module. You can do it like this: ServerRuntime cayenneRuntime = ServerRuntime.builder("cayenne-project.xml") .addModule(binder -> binder.bind(ObjectContextFa

Using my own ObjectContext class

2017-02-09 Thread Hugi Thordarson
Hi all, what is the proper way to have ServerRuntime.newContext() return my own implementation of ObjectContext? (inheriting from DataContext). Any reason why that would be discouraged? Cheers, - hugi