Home EnityManager does not generate delete query
Reply: 0

EnityManager does not generate delete query

user902 Published in April 25, 2018, 6:11 pm

I'm trying to delete an entity but the delete query is not generated and there's no error shown in the console :

public void removeClassObject(MyClassObject classObject) {
    MyClassObject ip = entityManager.find(MyClassObject.class, classObject.getId());

Take notice : @Transactional is from springFramework package


All my configuration are ok, because I already have the merge and persist functions doing there job without any problem it's just the remove method which doesn't generate any sql query and does not remove the given entity.

EDIT 2 :

This is how I obtain my entityManager :

@PersistenceContext(type = PersistenceContextType.TRANSACTION)
protected EntityManager entityManager;
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.323628 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO