We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ReadOnly properties should throw an exception if you try to update them
No exception is thrown and the update is committed to the graph
@Test(expected=OValidationException.class) public void testPropertyReadOnly() { String location = "memory:test_readOnly"; OrientGraphNoTx graphNoTx = new OrientGraphNoTx(location); OrientVertexType testType = graphNoTx.createVertexType("Test"); OProperty prop = testType.createProperty("name", OType.STRING).setReadonly(true); graphNoTx.shutdown(); Assert.assertTrue(prop.isReadonly()); //this one passes OrientGraph graph = new OrientGraph(location); try { OrientVertex vert1 = graph.addVertex("class:Test", "name", "Sam"); graph.commit(); vert1.setProperty("name", "Ben"); //should throw an exception graph.commit(); Assert.assertEquals(vert1.getProperty("name"), "Sam"); //fails } finally { graph.drop(); } }
The text was updated successfully, but these errors were encountered:
fixed bug on graph read only validation, issue #7144
12f4a56
hi @shooit,
Reproduced this and fixed, added the relative test case, it will be released in 2.2.17.
Regards
Sorry, something went wrong.
48db6e5
@tglman looks good to me. thanks!
tglman
No branches or pull requests
OrientDB Version: 2.2.16
Java Version: 1.8
OS: Ubuntu
Expected behavior
ReadOnly properties should throw an exception if you try to update them
Actual behavior
No exception is thrown and the update is committed to the graph
Steps to reproduce
The text was updated successfully, but these errors were encountered: