[Java Spring] Fix copyOf inheritance using empty object instead of passed value (#19426)

* Fix copyOf inheritance using empty object instead of passed value

* Generate new samples
This commit is contained in:
Marvin Sommer 2024-10-10 10:52:38 +02:00 committed by GitHub
parent d9cdecf3c3
commit a84946bdb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 13 additions and 13 deletions

View File

@ -15,7 +15,7 @@
}
protected Builder copyOf({{classname}} value) { {{#parentModel}}
super.copyOf(instance);{{/parentModel}}{{#vars}}
super.copyOf(value);{{/parentModel}}{{#vars}}
this.instance.{{setter}}(value.{{name}});{{/vars}}
return this;
}

View File

@ -206,7 +206,7 @@ public class Bar extends Entity implements BarRefOrValue {
}
protected Builder copyOf(Bar value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setId(value.id);
this.instance.setBarPropA(value.barPropA);
this.instance.setFooPropB(value.fooPropB);

View File

@ -188,7 +188,7 @@ public class BarCreate extends Entity {
}
protected Builder copyOf(BarCreate value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setBarPropA(value.barPropA);
this.instance.setFooPropB(value.fooPropB);
this.instance.setFoo(value.foo);

View File

@ -122,7 +122,7 @@ public class BarRef extends EntityRef implements BarRefOrValue {
}
protected Builder copyOf(BarRef value) {
super.copyOf(instance);
super.copyOf(value);
return this;
}

View File

@ -161,7 +161,7 @@ public class Foo extends Entity implements FooRefOrValue {
}
protected Builder copyOf(Foo value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setFooPropA(value.fooPropA);
this.instance.setFooPropB(value.fooPropB);
return this;

View File

@ -147,7 +147,7 @@ public class FooRef extends EntityRef implements FooRefOrValue {
}
protected Builder copyOf(FooRef value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setFoorefPropA(value.foorefPropA);
return this;
}

View File

@ -137,7 +137,7 @@ public class Pasta extends Entity {
}
protected Builder copyOf(Pasta value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setVendor(value.vendor);
return this;
}

View File

@ -146,7 +146,7 @@ public class Pizza extends Entity {
}
protected Builder copyOf(Pizza value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setPizzaSize(value.pizzaSize);
return this;
}

View File

@ -143,7 +143,7 @@ public class PizzaSpeziale extends Pizza {
}
protected Builder copyOf(PizzaSpeziale value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setToppings(value.toppings);
return this;
}

View File

@ -168,7 +168,7 @@ public class BigCat extends Cat {
}
protected Builder copyOf(BigCat value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setKind(value.kind);
return this;
}

View File

@ -131,7 +131,7 @@ public class Cat extends Animal {
}
protected Builder copyOf(Cat value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setDeclawed(value.declawed);
return this;
}

View File

@ -126,7 +126,7 @@ public class ChildWithNullable extends ParentWithNullable {
}
protected Builder copyOf(ChildWithNullable value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setOtherProperty(value.otherProperty);
return this;
}

View File

@ -123,7 +123,7 @@ public class Dog extends Animal {
}
protected Builder copyOf(Dog value) {
super.copyOf(instance);
super.copyOf(value);
this.instance.setBreed(value.breed);
return this;
}