Can anyone please explain me the differences between following methods of JPA\'s EntityManager: createQuery(), createNamedQuery() and createNativeQuery() And also explain me on
CreateQuery is used to create an JPQLqueries
CreateQuery
createNamedQuery is used to define queries with name in mapping file or annotation, example: obj.createNamedQuery("entity.findbycode",Something.class)
createNamedQuery
obj.createNamedQuery("entity.findbycode",Something.class)
createNativeQuery is used to execute native/pure SQL queries.
createNativeQuery