Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

kallmekunal_131749 avatar image
kallmekunal_131749 asked ·

How do I handle @UDT annotation from Java driver 3.x in 4.x version?

I need to migrate from datastax 3.x to 4.5 .

Binaries are incompatible with such gap and UDT annotations from 3.5 needs some refactoring i think for 4.5 ds version.

Is the @UDT annotation dropped in 4.x series?

how to handle the same in 4.5.?

If possible please provide a reference example where UDT is mapped with a java pojo

java driver
1 comment
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Please somebody help ..i m stuck

0 Likes 0 · ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

Java driver 4.1.0 introduced a new object mapper in the 4.x series (JAVA-2078). Details are documented in the Java driver Mapper docs.

You can have a look at the discussion and example in the driver docs here. There are also code samples available at DataStax Examples. Cheers!

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Really helpful answer.

Thanks !!

Any suggestions or example (which I could not find the github) for being able to define custom type other than java basic type and then use it inside cassandra code.

0 Likes 0 · ·