[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] NPE when updating entity where only @Element-collection has changed
|
Hi.
I'm getting bitten by this again, using EL-2.6.2. No hints of what might cause this?
Thanks.
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
Hi all.
I'm using EL-2.5.2 with PostgreSQL
I have one entity where the only field changed is an @ElementCollection, this results in the following code-path:
SQLUpdateStatement.buildCallWithoutReturning, line 64:
if (fieldsForTable.isEmpty()) {
return null;
}
Then null is returned and assigned to the sqlCall-variable in SQLModifyStatement.buildCall:
public DatabaseCall buildCall(AbstractSession session) {
SQLCall sqlCall = buildCallWithoutReturning(session); // null is returned here
if ((getReturnFields() == null) || getReturnFields().isEmpty()) {
return sqlCall;
} else {
return session.getPlatform().buildCallWithReturning(sqlCall, getReturnFields());
}
}
Using the PostgreSQLPlatform, this is what happens:
public DatabaseCall buildCallWithReturning(SQLCall sqlCall, Vector returnFields) {
SQLCall call = new SQLCall();
call.setParameters(sqlCall.getParameters()); // BOOM NPE !!!!!!!!!!
Has anyone else seen or been bitten by this?
Thanks.
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users