Should we use the Neo4J internal id? - neo4j

We are currently working with a Neo4j database, and we need some kind of id to identify nodes.
For example we have functions like CurrentUserHasAccess(NodeId)
On other Stackoverflow posts I read that it's a bad idea to use the internal neo4j-identifier, because it can change over time. However I think that's not an issue when we do not use this id to link data.
However I cannot seem to find any official sources about this topic.
I would like to use this ID because then we do not need to worry about uniqueness, and more importantly indexing.

You are right that it is generally not recommended to use the internal Neo4j node IDs. This is mainly because if a node gets deleted, its original internal ID may get recycled/reused. If you're looking for a quick and elegant solution to this, have a look at the UUID module of the GraphAware Framework here https://github.com/graphaware/neo4j-uuid and let us know if it works for you.

Related

Microsoft Graph educationClass expand with select

I'm trying to grab only properties "id" and "userPrincipalName" from the teacher when getting educationClasses with $expand=teacher as parameter. But whatever I do, I keep getting the full teacher/user object.
https://graph.microsoft.com/v1.0/education/classes?$expand=teachers($select=id,userPrincipalName)
But it gives the same result as this one:
https://graph.microsoft.com/v1.0/education/classes?$expand=teachers
What am I doing wrong?
Or is this one of the endpoints where the expand+select feature is not fully supported? I don't want the full teacher object because it contains assignedLicenses, assignedPlans, provisionedPlans and a whole lot of stuff I will never need in this request.
And...it's production, so I'd like to avoid using the BETA endpoint if possible.
Yep, looks like the underlying AAD storage doesn't support expand plus select.
You can see what is happening under the covers by appending the &$whatif to your query.
Not a lot we can do about this, as the AAD team aren't investing in adding richness here right now.

create relationship in parse dashboard

does anyone know if it is possible to create relationships in the dashboard of parse?
I'm running the bitnami parse api 1.0.18 through aws ec2 and can't see anyway of doing it and the documentations only says you can do it through code. i want to have these set up in the background as the user won't write to them, probably just download some data and images.
i could just go and create a whole heap of tables with unique identifiers but this seems a bit of a dumb work around.
I strongly suggest you look into Cloud code. This is one of the reason why cloud code works so well! Simple to setup and little bit of javascript you'll be on your way.
http://parseplatform.github.io/docs/cloudcode/guide/
If its something that needs to happen before the insert, look at the beforeSave method.

Is there a way to set Event ID on EventLog sink (in Serilog)?

I took a look at Serilog.Sinks.EventLog at Github and noticed there doesn't seem to be a way to set the Event ID of the logged event (example IDs here).
Would there exist a way to modify the sink so that it'd be possible? Perhaps with some kind of specially formatted message? I don't know if I should put this here or on Github, I'll try here first. :)
There isn't a mechanism currently for this - designing one seems tricky (but ultimately it'd be a great addition to the project!)

How to setup custom id-field in DB4O

I've read the documentation and samples multiple times and can't find out how to do this.,
I'm trying to wire up DB4O to use my own custom Id field. based on the documentation you can define your own IDs but as far as I can tell they won't replace Db4o's internal IDs, As in it won't actually use those Ids to identify the objects.
Basically all the examples do are tell Db4o to generate some sort of unique id and index it, I don't see anywhere on how to tell it that this is the ID that you should use.
Is it possible to have our own IDs on our model replace the internal IDs used to keep track of the relationships?
we need to have our own Ids since our system relies heavily on REST.
There no direct support for this. You need to create your own mechanism.
Simplest way: Use Guid on .NET. Or use a UUID in Java. In Java: Add UUID-Support: configuration.common().add(new UuidSupport());
Use callback to create new id's. Doesn't not work in TCP client/server.
See also this page.
Side note: You build a REST app. How many request does it need to handle? db4o is internally inherently single threaded. It can only handle a very limited load.

What is IdentityPart in Orchard CMS good for?

I havent found any mention in Orchard documentation about IdentityPart despite it being used in some main modules like Comments. I took a look at some relevant sources, but it didn't help me to fully understand it's purpose.
So what's it for and when should I use it?
Thanks in advance!
This is part of the import/export feature. In order to be able to move contents around servers reliably and in a repeatable way that takes into account updated and new items, we need a way to identify content items that's not just a simple id. Some contents have a path but not all types do (widgets, users, etc.). The export/import hooks for any part can participate in building the id of the item and in recognizing it on import. The routable part for example implements the use of path. But for those types that do not have routable, you can add the IdentityPart to fulfill that role. The id that gets exported in the end is a composite of all contributed ids.
Makes sense?

Resources