Home JPA equivalent for Hibernate NamedQuery's setCharacter(..), setDate(..) etc...?
Reply: 0

JPA equivalent for Hibernate NamedQuery's setCharacter(..), setDate(..) etc...?

user663
1#
user663 Published in June 23, 2018, 4:21 am

I want to set Date and Character in JPA. There are special methods in Hibernate as below:

Query q = session.getNamedQuery(namedQuery);
q.setDate(0, (Date) (params[i]));
q.setCharacter(1, params[i]);
q.executeUpdate();

Is there anything in JPA as setCharacter()?

I know there is setParameter() with Date but I do not know how to do it with Character. I want to convert it into JPA query parameter like:

Query q = getEntityManager().createNamedQuery(namedQuery);
// How to set Date and Character in JPA ?
...
q.executeUpdate();
You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO