@Node
class Something
{
@Id
@GeneratedValue
public Long id;
}
right now Id is not being generated when i save. Additionally i would expect that if using a long & GeneratedValue it would use the node id as in MATCH (n) return id(n);
Have I found a bug or am i incorrect in my assumptions?
You are right with your assumption and I just checked this very simple case:
package private class
public id
nothing else
accessed by a SomethingRepository either also package private or public.
This is working as expected.
Saving:
OPTIONAL MATCH (hlp:`Movie`) WHERE id(hlp) = $__id__ WITH hlp WHERE hlp IS NULL CREATE (n:`Movie`) SET n = $__properties__ RETURN id(n) UNION MATCH (n) WHERE id(n) = $__id__ SET n = $__properties__ RETURN id(n)
Loading:
MATCH (n:`Movie`) WITH n, id(n) AS __internalNeo4jId__ RETURN n{__internalNeo4jId__: id(n), __nodeLabels__: labels(n)}
So I would need, again , more details about how you access the data and/or other helpful informations.