-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
RemoteMutableEdge.save(bucketName) does not support update like its counter part RemoteMutableEdge.save() #1578
Comments
@rmsloan you're absolutely right. WDYT on providing a PR? |
For starters, I would have done this... @Override
public MutableEdge save(final String bucketName) {
dirty = true;
if (rid != null) {
// UPDATE
if (rid.getBucketId() != remoteDatabase.getSchema().getBucketByName(bucketName).getFileId())
throw new IllegalStateException("Cannot update a record in a custom bucket");
// Haven't tested this syntax as I noticed something else that would have got me before this...
remoteDatabase.command("sql", "update " + rid + " bucket " + bucketName + " set content " + toJSON());
} else {
// INSERT
remoteDatabase.command("sql", "insert into " + getTypeName() + " bucket " + bucketName + " content " + toJSON());
}
dirty = false;
return this;
} But as mentioned in the above comment...I soon realized...
Ok, sure not the end of the world, say I use it anyway, as there are no comments as to why it was Deprecated. The problem now is RemoteBucket
So before any attempt at a PR... Is RemoteBucket |
ArcadeDB Version:
ArcadeDB Server v24.4.1
OS and JDK Version:
Linux 4.18.0-477.21.1.el8_8.x86_64 - OpenJDK 64-Bit Server VM 11.0.22 (Temurin-11.0.22+7)
Expected behavior
Expected RemoteMutableEdge.save(bucketName) to perform an sql update similarly to its counter part save()
Actual behavior
RemoteMutableEdge.save(bucketName) throws an IllegalStateException; however I believe it should do the following if (rid != null)
Steps to reproduce
The text was updated successfully, but these errors were encountered: