Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating vertices and (heavyweight) edges in a transaction #2

Closed
Lithl opened this issue Nov 10, 2014 · 2 comments
Closed

Creating vertices and (heavyweight) edges in a transaction #2

Lithl opened this issue Nov 10, 2014 · 2 comments
Assignees

Comments

@Lithl
Copy link
Contributor

Lithl commented Nov 10, 2014

I am trying to create an extension method which, given a model object, will create vertices and edges between those vertices so that the model is accurately represented in the graph. For example, the models:

Person
    string FirstName
    string LastName
    Address Residence
    Address Shipping

Dependent : Person
    int Relationship

Address
    string AddressLine1
    string AddressLine2
    Person Resident

Creating a record with a Dependent object would be, essentially:

create vertex Dependent content {...}
create vertex Address content {...}
create vertex Address content {...}
create edge ResidenceAddress from ... to ...
create edge ShippingAddress from ... to ...

However, when I use OTransaction#Add to create these records, my heavyweight edges are not connected to my vertices. All of my vertices are created with their properties set correctly, and all of my edges are created wit their properties set correctly (including out and in), but the vertices can't see their edges.

I can apparently replicate this same behavior within the OrientDB studio using insert into ... instead of create edge ...

According to RobinG in a response to my SO question about this, the OTransaction class is incomplete, so I began attempting to add to the library so that I could get heavyweight edges working with transactions properly. However, my understanding of the binary interface is limited, and I've run into a wall.

@GoorMoon GoorMoon self-assigned this Nov 10, 2014
GoorMoon added a commit that referenced this issue Nov 14, 2014
@GoorMoon
Copy link
Contributor

Hi @Lithl,

I looked to OTransaction class and is complete and do work.
Added example how to create heavy-edges with OTransaction.

@Lithl
Copy link
Contributor Author

Lithl commented Nov 14, 2014

Thanks, GoorMoon, I seem to have it working.

If you want to create an answer on my SO question, I'll happily mark it as accepted.

@Lithl Lithl closed this as completed Nov 14, 2014
schwarzeszeux pushed a commit to schwarzeszeux/OrientDB-NET.binary that referenced this issue Mar 23, 2016
lvca pushed a commit that referenced this issue May 26, 2016
…only create a new pool for a given alias if one does not already exist for it. (#2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants