1Query query = this.entityManager.createNativeQuery("YourQuery");
2List<ObjectName> list = query.getResultList();
3return list;
4
1Query query = this.entityManager.createNativeQuery(searchQuery, "TicketMapping");
2//--------------------------------------------------------------------^^
3//This should be the ObjectName.class
4
1Query query = this.entityManager.createNativeQuery("YourQuery", ObjectName.class);
2