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

BEFORE_DELETE Hook Problem #1657

Closed
wallyatkins opened this issue Sep 5, 2013 · 4 comments
Closed

BEFORE_DELETE Hook Problem #1657

wallyatkins opened this issue Sep 5, 2013 · 4 comments
Assignees
Labels

Comments

@wallyatkins
Copy link

OVERVIEW
This test demonstrates a bug in which an OrientDB BEFORE_DELETE hook receives an unpopulated iRecord when OObjectDatabaseTx.delete(Object) is called within a transaction.

ANALYSIS
The test fails due to a NullPointerException (NPE) being thrown in the BEFORE_DELETE hook, when ((ODocument)iRecord).getClassName() is used for a .equals() comparison - in the same manner as shown in OrientDB examples. This NPE occurs because getClassName() returns null, because the iRecord's fields are not populated when the onTrigger method is called.

ENVIRONMENT
BeforeDeleteHook.java implements a server side hook, with an onTrigger method for processing BEFORE_DELETE.
The client (TestHook.java) connects using the OrientDB remote protocol.
The delete method is called within an OrientDB transaction.

@wallyatkins
Copy link
Author

This thread from the OrientDB Google Groups contains a sample project which demonstrates the issue.

https://groups.google.com/forum/#!topic/orient-database/1FF8NGoYRh8

@ghost ghost assigned lvca Sep 9, 2013
@lvca
Copy link
Member

lvca commented Sep 9, 2013

Your test case passes against OrientDB 1.6.0-SNAPSHOT:

About to delete item with id: #9:0
Deleted Item_$$_javassist_0@cd11fa6

@lvca lvca closed this as completed Sep 9, 2013
@wallyatkins
Copy link
Author

Thanks Luca! Is there a set release date for OrientDB 1.6 yet? I saw something about mid September in the Google Groups. Is that still the plan?

@lvca
Copy link
Member

lvca commented Sep 9, 2013

Yes, it should be on September 24-26th.

@lvca lvca modified the milestone: 1.6 Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants