orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Adding to a linklist using a subquery for the rid does not work

Open grendo opened this issue 12 years ago • 2 comments

CREATE CLASS Funds CREATE PROPERTY Funds.Code String

CREATE CLASS Portfolios CREATE PROPERTY Portfolios.Code String

CREATE PROPERTY Funds.Portfolios linklist Portfolios

I am trying to add records Portfolios collection in the Fund which works when I use a hard coded rid like below

update Funds add Portfolios = #12:1 Where Code='Fund1'

using a subquery does not work

eg

update Funds add Portfolios = (SELECT @rid FROM Portfolios Where Code='Port1') Where Code='Fund1'

grendo avatar Jan 04 '14 23:01 grendo

I'm working to the solution. Now this works:

update Funds add Portfolios = (SELECT FROM Portfolios Where b=434)

As soon as the test cases pass I push it.

lvca avatar Jan 05 '14 22:01 lvca

I've tested this with v.1.7-rc2 but ran into some issues: #2164

dxxr avatar Mar 31 '14 09:03 dxxr