--
@Query( "START n=node:search(username={0}) MATCH n-[r:STATUS]->oldsu DELETE r " +
"WITH n,oldsu CREATE n-[:STATUS]->(newsu {statusid:{1},statusUpdate:{2},postedDate:{3}})-[:NEXT]-oldsu")
void newStatusUpdate(String username, String statusid, String statusupdate, Date createddate);
However, how do i need to take care of is "su" doesn't exist, in that case second sub-query would not get executed.
Kindly help me.
Thanks,
@Query( "START n=node:search(username={0}) MATCH n-[r?:STATUS]->oldsu DELETE r " +
"WITH n,oldsu CREATE n-[:STATUS]->(newsu {statusid:{1},statusUpdate:{2},postedDate:{3}})-[:NEXT]->oldsu")
void newStatusUpdate(String username, String statusid, String statusupdate, Date createddate);
--
--
--
@Query( "START n=node:search(username={0}) MATCH n-[r?:STATUS]->oldsu DELETE r " +
"WITH n,oldsu CREATE n-[:STATUS]->(newsu {statusid:{1},statusUpdate:{2},postedDate:{3}})-[:NEXT]->oldsu"
--
--
--
--