This is my Sender entity
@Entity
public class Sender {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long senderId;
...
...
p
Object database mapping is wrong. There is a casting exception here saying database field is BigInteger
, but object property is long
.
BigInteger
is a special class to hold unlimited size integer values. Furthermore, BigInteger
can not cast to long implicitly.
To avoid this error database field which is BigInteger
should be change to long
compatible type. Change it to a int
type where int can be casted to long
implicitly. See BigInteger.