Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMBEDDEDMAP must be initiated by default to use it in UPSERT #8701

Closed
freeart opened this issue Dec 13, 2018 · 2 comments
Closed

EMBEDDEDMAP must be initiated by default to use it in UPSERT #8701

freeart opened this issue Dec 13, 2018 · 2 comments
Assignees
Milestone

Comments

@freeart
Copy link

freeart commented Dec 13, 2018

OrientDB Version: 3.1.0 from develop branch

Java Version: docker openjdk:8-jdk-alpine

OS: docker openjdk:8-jdk-alpine

Steps to reproduce

CREATE CLASS TForm
CREATE PROPERTY `TForm`.`answer` EMBEDDEDMAP STRING
ALTER PROPERTY `TForm`.`answer` mandatory true
ALTER PROPERTY `TForm`.`answer` notNull true
UPDATE TForm
SET
	answer.name = :answername
UPSERT 
WHERE id = :id

Returns

com.orientechnologies.orient.core.exception.OValidationException: The field 'TForm.answer' is mandatory, but not found on record

I can't do like

UPDATE TForm
SET
	answer = {"name" :answername}
UPSERT 
WHERE id = :id

Because it rewrites all data in answer.

@luigidellaquila
Copy link
Member

Hi @freeart

Good point, probably we can leverage the schema here and make the first statement work. I'll check it ASAP and let you know

Thanks

Luigi

@luigidellaquila
Copy link
Member

Hi @freeart

I just pushed a fix, it will be released with V 3.0.13

Thanks

Luigi

@luigidellaquila luigidellaquila self-assigned this Dec 17, 2018
@luigidellaquila luigidellaquila added this to the 3.0.13 milestone Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants