Impetus / kundera

A JPA 2.1 compliant Polyglot Object-Datastore Mapping Library for NoSQL Datastores.Please subscribe to:
http://groups.google.com/group/kundera-discuss/subscribe
Apache License 2.0
903 stars 234 forks source link

Using image blob in native queries (Cassandra) #1032

Open sohelmk opened 5 years ago

sohelmk commented 5 years ago

Hi, I am unable to insert image (byte array in scala) into a blob column in cassandra. Please help or let me know if its a limitation and if any other options.

Thanks, Sohel

devender-yadav commented 5 years ago

Check ByteDataTest.java

sohelmk commented 5 years ago

Thanks a lot Devender, but these examples are not for native queries. Can you please redirect to an example with native query?

for eg : code looks as follows: var cql = "UPDATE groups SET created_by = " + grup.creator + ",access_type='" + grup.gtype + "',labels=" + grup.getLabelString() + ",updated_timestamp='" + grup.utime + "', created_timestamp='" + grup.ctime + "',updated_by=" + grup.updator + ", description='" + grup.descr + "',group_account='" + grup.grouAccount + "',group_name='" + grup.gname + "' WHERE group_id=" + grup.gid logger.debug("Update Group native cql" + cql)

  var query = em.createNativeQuery(cql).executeUpdate()

How do i add byte array in above query?

Thanks, Sohel