Closed yeshvanthni closed 10 years ago
Yes, it's a constraint. Since Kundera supports multiple databases and em.createNativeQuery("queryString",DummyClass.class); would be required to explicitly map to specific client(whether Cassandra,MongoDB etc) in case of polyglot persistence.
However in case of single persistence unit it should be supported to default one. Will analyze and get it fixed with 2.10 release
-Vivek
Moving for 2.11 release. For non polyglot cases , will asses and post an update.
-Vivek
Support has been added for em.createNativeQuery(jpaQuery) and releasing with 2.10
em.createNativeQuery(select count(*) from person");
Alternative you may also use @NamedNativeQuery to define such native queries and use as follows:
@Entity
@Table(name = "person",)
@NamedNativeQuery(name="countQuery", query="select count(*) from person")
public class PersonCassandra
{
......
}
em.createNamedQuery("countQuery");
Hope it helps.
-Vivek
Support has been added and releasing with 2.10
-Vivek
Queries like delete queries does not need the resultset to be translated to an Object so this api should still allow clients to invoke native CQL queries at their discretion.
Workaround: Call delete query with em.createNativeQuery("queryString",DummyClass.class);