ArcadeDB engine gracefully handles null LINK values #1088
vic0824
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
@gramian do we have this behavior in the docs already? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you have a property of type LINK, which most of the times points to a real record in another Type but sometimes it doesn't,
you can safely insert null into a Type.LINK property and consistently use the dot notation to retrieve the linked record.
The engine is smart enough to return null instead of throwing NPE.
I think this is a neat feature: I was worried I had to handle the null case myself in the client code, but I've found out the engine does it for me, so I don't need to catch the NPE or waste storage space replacing the LINK type with an EMBEDDED type.
Beta Was this translation helpful? Give feedback.
All reactions