xun su
03/09/2023, 1:26 AM@Entity
public class Book extends PanacheEntity {
public String title;
@ManyToOne
@JsonbTransient
public Author author;
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Book)) {
return false;
}
Book other = (Book) o;
return Objects.equals(id, other.id);
}
@Override
public int hashCode() {
return 31;
}
}
As you can see, here is annotation named @JsonbTransient
, the docs says "We mark this property with @JsonbTransient
to avoid infinite loops when serializing with JSON-B.",
I wanna know the counterpart annotation in kotlinx.serialization.Serializable
.
I've tried @transient
, but it seems to bring other hibernate initialize error.Adam S
03/09/2023, 9:06 AM@Transient
annotation (don't confuse it with kotlin.jvm.Transient)?