-
Notifications
You must be signed in to change notification settings - Fork 871
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
Document class not retrieved #8052
Comments
it seems a record is saved in the "default" cluster (cluster 3) instead of its own class cluster. Of course this should not happen The use case you described is pretty basic, but it seems we cannot replicate it, so there must be something else. Any chance to have a plain junit test (without your application logic) that reproduces it? Thanks Luigi |
It is going to take me some time, but I will try to isolate it in an integration test. |
Ok, now I know the reason. I was creating the document inside a transaction, and, as explained in the documentation, the schema can not be changed inside a transaction (the document class does not exist before saving the first document). That´s fine. |
OrientDB Version: 2.2.31, but I tested with older versions and the behavior is the same.
Java Version: 1.8
OS: Windows, Linux.
Given an empty document database, I repeat the following process several times:
new ODocument(RESOURCE_DOCUMENT_CLASS)
db.save(oDocument)
Expected behavior
Everything correct.
Actual behavior
The document which was saved first, id #3:0, is retrieved successfully, but its class is empty.
The rest of documents are correct. Ids #17:0, #18:0.
If instead of retrieving one by one I do a
db.browseClass(RESOURCE_DOCUMENT_CLASS)
the first document is not returned.If I execute a SQL query filtering by document class the result is the same, the first one saved is not returned.
Steps to reproduce
I have several integration tests proving this behavior but they are part of a product so I can not make them public.
I have tested using both Plocal and a in Memory databases, and the result is the same.
May I be doing something wrong?
The text was updated successfully, but these errors were encountered: