.............
before pringing my name.......
in test funnnnnnnnnnnnn
Exception in thread "main" java.lang.NullPointerException
at Myprint.testfun(Myprint.java:36)
at Myprint.main(Myprint.java:29)
.Other tip, merge don't update database, the only function for merge is to bring de entity object to persistent context.
EntityManager.merge updates the database with the data held in the entity,