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
Execute the following code to reproduce the exception:
TestMultiPkUpdatetestMultiPk = newTestMultiPkUpdate();
testMultiPk.setP1("p1");
testMultiPk.setP2("p2");
testMultiPk.setCol("success");
// Expect the value of the col column to be updated to "success". And the actual exception is thrown:// java.lang.NullPointerException: Cannot invoke "io.ebean.bean.EntityBean._ebean_getField(int)" because "bean" is nullDB.update(testMultiPk);
Caused by: java.lang.NullPointerException: Cannot invoke "io.ebean.bean.EntityBean._ebean_getField(int)" because "bean" is null at io.ebeaninternal.server.properties.EnhanceBeanPropertyAccess$Getter.get(EnhanceBeanPropertyAccess.java:57) at io.ebeaninternal.server.deploy.BeanProperty.getValue(BeanProperty.java:768)
The text was updated successfully, but these errors were encountered:
Hi. I just want to say that this is an easily reproducible exception, and it is very common to use multiple columns as primary keys, I look forward to this exception being resolved. Or am I using it incorrectly? Please guide me past this blocker, thank you very much
Thanks for the guidance, I did successfully get the record updated using @EmbeddedId. I want to confirm that using @IdClass is not supported? Or is this a problem? Because I do tend to use @IdClass to map concatenated primary keys.
This exception occurs in both 12.16.1 and the latest 13.25.1 versions, I have not tried earlier versions.
Expected behavior
Expect the value of the col column to be updated to "success"
Actual behavior
java.lang.NullPointerException: Cannot invoke "io.ebean.bean.EntityBean._ebean_getField(int)" because "bean" is null
Steps to reproduce
Define the table under postgresql and add test records (the same problem occurs when testing under mysql)
Define java beans
Execute the following code to reproduce the exception:
The text was updated successfully, but these errors were encountered: