kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | ea7f986172f9eb9fa9a2bc38f4acbbd69cfdbf8b2f83a5a43e3fc361b5ece4f8 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2015-06-30 15:37 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-06-30 15:48 +02:00 |
| Parents | 5dad311f5093 |
1 file changed
modified driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java +5 −2
| @@ -16,6 +16,8 @@ | ||
| 16 | 16 | package com.datastax.driver.mapping; |
| 17 | 17 | |
| 18 | 18 | import java.net.InetAddress; |
| 19 | + | |
| 20 | +import com.datastax.driver.core.utils.CassandraVersion; | |
| 19 | 21 | import com.datastax.driver.mapping.annotations.Table; |
| 20 | 22 | import java.util.*; |
| 21 | 23 | |
| @@ -312,6 +314,7 @@ | ||
| 312 | 314 | } |
| 313 | 315 | |
| 314 | 316 | @Test(groups = "short") |
| 317 | + @CassandraVersion(major=2.0) | |
| 315 | 318 | public void testDynamicEntity() throws Exception { |
| 316 | 319 | MappingManager manager = new MappingManager(session); |
| 317 | 320 | |
| @@ -400,7 +403,7 @@ | ||
| 400 | 403 | m.save(p3); |
| 401 | 404 | |
| 402 | 405 | // Retrieve posts with a projection query that only retrieves some of the fields |
| 403 | - ResultSet rs = session.execute("select user_id, post_id, title from posts where user_id = ?", u1.getUserId()); | |
| 406 | + ResultSet rs = session.execute("select user_id, post_id, title from posts where user_id = " + u1.getUserId()); | |
| 404 | 407 | |
| 405 | 408 | Result<Post> result = m.map(rs); |
| 406 | 409 | for (Post post : result) { |
| @@ -413,6 +416,6 @@ | ||
| 413 | 416 | } |
| 414 | 417 | |
| 415 | 418 | // cleanup |
| 416 | - session.execute("delete from posts where user_id = ?", u1.getUserId()); | |
| 419 | + session.execute("delete from posts where user_id = " + u1.getUserId()); | |
| 417 | 420 | } |
| 418 | 421 | } |