Change to new OEMIV pattern

Change to support open entity manager in view pattern