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

Weird behaviour of "rawExpression" in Transaction Builder #345

Closed
petervavro opened this issue Nov 5, 2018 · 7 comments
Closed

Weird behaviour of "rawExpression" in Transaction Builder #345

petervavro opened this issue Nov 5, 2018 · 7 comments
Assignees
Labels
Milestone

Comments

@petervavro
Copy link

I am running similar code :

var trx = db.let('player', function(p){

    links = db.rawExpression(`list($link1) || list($link2)`)

    p.create('vertex', 'Player')
        .set({
            name:      'Ty Cobb',
            birthDate: '1886-12-18',
            deathDate: '1961-7-17',
            batted:    'left',
            threw:     'right',
            links:      links
        })
})
.commit().return('$player').all()
.then(
    function(results){
        console.log(results);
    }
);
BEGIN;
LET player = CREATE vertex Player SET name = "Ty Cobb", birthDate: "1886-12-18", deathDate = '1961-7-17', batted = list($link1) || list($link2), threw = "right", links = list($link1) || list($link2)
COMMIT;
RETURN $player;

Issue : For some unknown reason the content of "links" is added to "batted" as well.

This weird behaviour appeared after I started to use it the way described here. Before, I was connecting to DB this way :

var server = OrientDB({
   host:     '10.0.1.5',
   port:     2424,
   username: 'root',
   password: 'root_passwd',
});

var db = server.use({
   name:     'GratefulDeadConcerts',
   username: 'admin',
   password: 'admin_passwd'
});

I will appreciate any advice, this is really weird. Thank you.

@wolf4ood
Copy link
Member

wolf4ood commented Nov 5, 2018

@petervavro

Probably it's a bug. let me check ASAP.

Thanks

@petervavro
Copy link
Author

Please do, this is something urgent. I am stucked already a few days with this. Thank you.

wolf4ood added a commit that referenced this issue Nov 5, 2018
@wolf4ood
Copy link
Member

wolf4ood commented Nov 5, 2018

Hi @petervavro

i've just pushed a fix. Let me wait for the CI then i can make a new release 3.0.1 with this fix

@petervavro
Copy link
Author

@wolf4ood Thank you so much. I am happy you found it. I am really stucked with this one. Do you think you can provide me with the fix / code before it is released ( like now :) ), ASAP, this is really blocking me to continue, I really appreciate that.

@wolf4ood
Copy link
Member

wolf4ood commented Nov 5, 2018

Hi @petervavro

Just published 3.0.1 on NPM with the fix. Let me know if that works for you

Thanks

@wolf4ood wolf4ood self-assigned this Nov 5, 2018
@wolf4ood wolf4ood added the bug label Nov 5, 2018
@petervavro
Copy link
Author

@wolf4ood BUG disappeared, works great, Thank you so much !

@wolf4ood wolf4ood added this to the 3.0.1 milestone Nov 5, 2018
@wolf4ood
Copy link
Member

wolf4ood commented Nov 5, 2018

Cool

@wolf4ood wolf4ood closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants