Skip to content

Writing One2Many fields does not work #32

@sjurba

Description

@sjurba

Trying to write a row with a One2Many field triggers this error.

java.lang.NumberFormatException: For input string: "[Ljava.lang.Object;@34a762fe"
	at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
	at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.base/java.lang.Double.parseDouble(Double.java:792)
	at java.base/java.lang.Double.valueOf(Double.java:755)
	at com.odoojava.api.ObjectAdapter.formatIntegerForWrite(ObjectAdapter.java:807)
	at com.odoojava.api.ObjectAdapter.formatValueBasedOnFieldTypeForWrite(ObjectAdapter.java:779)
	at com.odoojava.api.ObjectAdapter.formatValueForWrite(ObjectAdapter.java:758)
	at com.odoojava.api.ObjectAdapter.createObject(ObjectAdapter.java:934)

Seems to be a simple issue in the switch statement in ObjectAdapter.formatValueBasedOnFieldTypeForWrite()

I will create a PR fixing this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions