Commit 984d64f
JAVA-2286: Improve error reporting when entity has no properties
Motivation:
Currently if an Entity-annotated class lacks any properties, code
generation produces code that doesn't compile because no properties are
specified using QueryBuilder.
To rectify this, preemptively check to see if an Entity lacks properties
when generating its definition.
Modifications:
Update DefaultEntityFactory.getDefinition to generate an error if no
properties are specified on an Entity-annotated class.
Result:
A more appropriate compiler error is now generated informing the user
that their Entity-annotated class lacks properties.1 parent 32460db commit 984d64f
2 files changed
Lines changed: 22 additions & 0 deletions
File tree
- mapper-processor/src
- main/java/com/datastax/oss/driver/internal/mapper/processor/entity
- test/java/com/datastax/oss/driver/internal/mapper/processor/entity
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
310 | 323 | | |
311 | 324 | | |
312 | 325 | | |
0 commit comments