| TBH I have not looked at your test. I was simply replying based on a question Luis Barreiro asked me in an email regarding this issue. In your description you seem to indicate that you expect a proxy to be returned when bytecode enhancement is used. That's not how it works. Think of proxy and bytecode enhancement as mutually exclusive alternatives. If you call EntityManager#getReference on an entity that is bytecode enhanced, you get back the bytecode enhanced object not a proxy. |