@@ -39,33 +39,33 @@ void addColumnAnnotationAlongElementCollection() {
3939 java (
4040 """
4141 import java.util.List;
42-
42+
4343 import javax.persistence.ElementCollection;
4444 import javax.persistence.Entity;
4545 import javax.persistence.Id;
46-
46+
4747 @Entity
4848 public class ElementCollectionEntity {
4949 @Id
5050 private int id;
51-
51+
5252 @ElementCollection
5353 private List<String> listofStrings;
5454 }
5555 """ ,
5656 """
5757 import java.util.List;
58-
58+
5959 import javax.persistence.Column;
6060 import javax.persistence.ElementCollection;
6161 import javax.persistence.Entity;
6262 import javax.persistence.Id;
63-
63+
6464 @Entity
6565 public class ElementCollectionEntity {
6666 @Id
6767 private int id;
68-
68+
6969 @Column(name = "element")
7070 @ElementCollection
7171 private List<String> listofStrings;
@@ -86,12 +86,12 @@ void updateColumnAnnotationWithoutExistingAttributes() {
8686 import javax.persistence.Entity;
8787 import javax.persistence.Id;
8888 import javax.persistence.Column;
89-
89+
9090 @Entity
9191 public class ElementCollectionEntity {
9292 @Id
9393 private int id;
94-
94+
9595 @ElementCollection
9696 @Column
9797 private List<String> listofStrings;
@@ -102,12 +102,12 @@ public class ElementCollectionEntity {
102102 import javax.persistence.Entity;
103103 import javax.persistence.Id;
104104 import javax.persistence.Column;
105-
105+
106106 @Entity
107107 public class ElementCollectionEntity {
108108 @Id
109109 private int id;
110-
110+
111111 @ElementCollection
112112 @Column(name = "element")
113113 private List<String> listofStrings;
@@ -128,12 +128,12 @@ void updateColumnAnnotationWithExistingAttributes() {
128128 import javax.persistence.Entity;
129129 import javax.persistence.Id;
130130 import javax.persistence.Column;
131-
131+
132132 @Entity
133133 public class ElementCollectionEntity {
134134 @Id
135135 private int id;
136-
136+
137137 @Column(nullable = false, length = 512)
138138 @ElementCollection
139139 private List<String> listofStrings;
@@ -145,12 +145,12 @@ public class ElementCollectionEntity {
145145 import javax.persistence.Entity;
146146 import javax.persistence.Id;
147147 import javax.persistence.Column;
148-
148+
149149 @Entity
150150 public class ElementCollectionEntity {
151151 @Id
152152 private int id;
153-
153+
154154 @Column(name = "element", nullable = false, length = 512)
155155 @ElementCollection
156156 private List<String> listofStrings;
@@ -171,15 +171,15 @@ void addColumnToApplicableFieldWhileAvoidingOthers() {
171171 import javax.persistence.Entity;
172172 import javax.persistence.Id;
173173 import javax.persistence.Column;
174-
174+
175175 @Entity
176176 public class ElementCollectionEntity {
177177 @Id
178178 private int id;
179-
179+
180180 @Column
181181 private List<Integer> listOfInts;
182-
182+
183183 @ElementCollection
184184 private List<String> listofStrings;
185185 }
@@ -190,15 +190,15 @@ public class ElementCollectionEntity {
190190 import javax.persistence.Entity;
191191 import javax.persistence.Id;
192192 import javax.persistence.Column;
193-
193+
194194 @Entity
195195 public class ElementCollectionEntity {
196196 @Id
197197 private int id;
198-
198+
199199 @Column
200200 private List<Integer> listOfInts;
201-
201+
202202 @Column(name = "element")
203203 @ElementCollection
204204 private List<String> listofStrings;
@@ -224,7 +224,7 @@ void doNotChangeColumnWithoutSiblingElementCollection() {
224224 public class ElementCollectionEntity {
225225 @Id
226226 private int id;
227-
227+
228228 @Column
229229 private List<String> listofStrings;
230230 }
@@ -244,12 +244,12 @@ void doNotChangeColumnWithExistingNameAttribute() {
244244 import javax.persistence.Entity;
245245 import javax.persistence.Id;
246246 import javax.persistence.Column;
247-
247+
248248 @Entity
249249 public class ElementCollectionEntity {
250250 @Id
251251 private int id;
252-
252+
253253 @ElementCollection
254254 @Column(name = "test")
255255 private List<String> listofStrings;
@@ -271,12 +271,12 @@ void doNotAddColumnMappingToTransient() {
271271 import javax.persistence.Id;
272272 import javax.persistence.Column;
273273 import javax.persistence.Transient;
274-
274+
275275 @Entity
276276 public class ElementCollectionEntity {
277277 @Id
278278 private int id;
279-
279+
280280 @Transient
281281 @ElementCollection
282282 private List<String> listofStrings;
@@ -296,11 +296,11 @@ void doNotAddColumnMappingIfClassNotEntity() {
296296 import javax.persistence.ElementCollection;
297297 import javax.persistence.Id;
298298 import javax.persistence.Column;
299-
299+
300300 public class ElementCollectionEntity {
301301 @Id
302302 private int id;
303-
303+
304304 @ElementCollection
305305 private List<String> listofStrings;
306306 }
@@ -319,45 +319,45 @@ void handleInnerClass() {
319319 import javax.persistence.ElementCollection;
320320 import javax.persistence.Entity;
321321 import javax.persistence.Id;
322-
322+
323323 @Entity
324324 public class ElementCollectionEntity {
325325 @Id
326326 private int id;
327-
327+
328328 @ElementCollection
329329 private List<String> listofStrings;
330-
330+
331331 class InnerClass {
332332 @Id
333333 private int id2;
334-
334+
335335 @ElementCollection
336336 private List<String> listofStrings2;
337337 }
338338 }
339339 """ ,
340340 """
341341 import java.util.List;
342-
342+
343343 import javax.persistence.Column;
344344 import javax.persistence.ElementCollection;
345345 import javax.persistence.Entity;
346346 import javax.persistence.Id;
347-
347+
348348 @Entity
349349 public class ElementCollectionEntity {
350350 @Id
351351 private int id;
352-
352+
353353 @Column(name = "element")
354354 @ElementCollection
355355 private List<String> listofStrings;
356-
356+
357357 class InnerClass {
358358 @Id
359359 private int id2;
360-
360+
361361 @Column(name = "element")
362362 @ElementCollection
363363 private List<String> listofStrings2;
0 commit comments