You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* When using this test data with [LightJavaCodeInsightFixtureTestCase],
9
+
* the highlighted elements are not parsed correctly, resulting in errors.
10
+
* Compare the highlights in this test data with the actual highlights in IDEA,
11
+
* and visually confirm that the highlights and errors occur as expected based on the test data.
12
+
*/
13
+
@Dao
14
+
publicinterfaceAnnotationOptionTestDao {
15
+
16
+
// Valid include option
17
+
@Insert(include = {"name", "location"})
18
+
intinsertWithValidInclude(Departmentdepartment);
19
+
20
+
// Invalid include option
21
+
@Update(include = {"name", <errordescr="Field [invalidField] specified in [include] option does not exist in \"Department\". Available fields: [id, name, location, managerCount, embeddableEntity, embeddableEntity2] ">"invalidField"</error>})
@Insert(exclude = {<errordescr="Field [salary] specified in [exclude] option does not exist in \"Department\". Available fields: [id, name, location, managerCount, embeddableEntity, embeddableEntity2] ">"salary"</error>, "location"})
@Update(include = {"name"}, exclude = {<errordescr="Field [bonus] specified in [exclude] option does not exist in \"Department\". Available fields: [id, name, location, managerCount, embeddableEntity, embeddableEntity2] ">"bonus"</error>})
34
+
intupdateWithMixedOptions(Departmentdepartment);
35
+
36
+
// sqlFile = true should ignore include/exclude
37
+
@Update(sqlFile = true, include = {"invalidField"})
38
+
intupdateWithSqlFile(Departmentdepartment);
39
+
40
+
// BatchUpdate with invalid include
41
+
@BatchUpdate(include = {<errordescr="Field [email] specified in [include] option does not exist in \"Department\". Available fields: [id, name, location, managerCount, embeddableEntity, embeddableEntity2]">"email"</error>})
// End Embedded Property - should show error for Embeddable type needing property specification
53
+
@Update(include = {<errordescr="Field [embeddableEntity specified in [include] option is an Embeddable type \"ClientUser\". Must specify its properties. Available properties: [id, name, number]">"embeddableEntity"</error>})
54
+
intupdateEmbedded(Departmentdepartment);
55
+
56
+
// Valid Embedded Property specification
57
+
@Insert(include = {<errordescr="Field [age] specified in [include] option does not exist in \"EmbeddableEntity\". Available fields: [id, name, number, childEmbedded, childEmbedded2]">"embeddableEntity.age"</error>, "embeddableEntity.id"})
@Update(returning = @Returning(include = {<errordescr="Field [age] specified in [include] option does not exist in \"ClientUser\". Available fields: [id, name, location, managerCount, embeddableEntity, embeddableEntity2] ">"embeddableEntity.age"</error>}))
72
+
DepartmentupdateReturning(Departmentdepartment);
73
+
74
+
@Insert(returning = @Returning(exclude = {<errordescr="Field [embeddableEntity] specified in [exclude] option is an Embeddable type \"ClientUser\". Must specify its properties. Available properties: [id, name, number]">"embeddableEntity"</error>}))
75
+
DepartmentinsertReturning(Departmentdepartment);
76
+
77
+
@MultiInsert(returning = @Returning(include = {<errordescr="Field [email] specified in [include] option does not exist in \"Department\". Available fields: [id, name, location, managerCount, embeddableEntity, embeddableEntity2] ">"email"},
78
+
exclude = {<errordescr="Field [salary] specified in [exclude] option does not exist in \"ClientUser\". Available fields: [id, name, location, managerCount, embeddableEntity, embeddableEntity2] ">"embeddableEntity.salary"</error>}))
0 commit comments