I finally solved the problem. The solution was using the universal computing procedure: reset. In my case, reset Glassfish.
Even more, it is not even a Glassfish issue because the buggy web application version did not have "setMyObject(new MyObject())" so next attempts to create the entity the JPA container throwed a "dettached exception" so there was no chance to call "setMyObject(new MyObject())".
What I did was reset the application but this does not solve anything as it should do.
A really stupid 2 hours spent on this, hope I learned the lesson :)
[Message sent by forum member 'pauca' (pau.carre_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=382017