Suggest returning to domain object by Cypher Query Language adding NEW key words
24 views
Skip to first unread message
杨军
unread,
Nov 23, 2012, 2:23:31 AM11/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ne...@googlegroups.com
When using the NE04J data base, modeling the domain object under embedded model always uses
public class DomainModel { protected final Node underlyingNode; public DomainModel( final Node underlyingNode ) { this. underlyingNode = underlyingNode; }
... }
When using Cypher Query Language, RETUEN can return to DomainMOdel object directly through NEW key words For example:
START john=node:node_auto_index(name = 'John') MATCH john-[:friend]->()-[:friend]->fof
RETURN new DomainModel(john) , fof
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ne...@googlegroups.com
When using the NEO4J data base, modeling the domain object under embedded model always uses
public class DomainModel { protected final Node underlyingNode; public DomainModel( final Node underlyingNode ) { this. underlyingNode = underlyingNode; }
... }
When using Cypher Query Language, RETUEN can return to DomainMOdel object directly through NEW key words For example:
START john=node:node_auto_index(name = 'John') MATCH john-[:friend]->()-[:friend]->fof
RETURN new DomainModel(john) , fof
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ne...@googlegroups.com
I think this mixes two concerns,
cypher returns the data from the database much like SQL,
you would use a mapping framework to convert them into objects, e.g. Spring Data Neo4j, Spring and the JDBC Driver or something like the DataNucleus bindings
Michael
--
Josh Adell
unread,
Nov 23, 2012, 11:00:48 AM11/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ne...@googlegroups.com
How would this be handled in a non-embedded sense, over the REST API?