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

linkeset does not save correct order of records #6669

Closed
1 of 5 tasks
habi4ek opened this issue Sep 8, 2016 · 7 comments
Closed
1 of 5 tasks

linkeset does not save correct order of records #6669

habi4ek opened this issue Sep 8, 2016 · 7 comments
Assignees
Labels

Comments

@habi4ek
Copy link

habi4ek commented Sep 8, 2016

OrientDB Version, operating system, or hardware.

  • v2.2.8

Operating System

  • Linux
  • MacOSX
  • Windows
  • Other Unix
  • Other, name?

Expected behavior and actual behavior

order of records must be the same as I was writing in the database

Steps to reproduce the problem

orientdb {db=test}> create class test extends V
Class created successfully. Total classes in database now: 12.

orientdb {db=test}> create property test.ts linkset
Property created successfully with id=1.

orientdb {db=test}> insert into test set ts= [#5:0,#5:3,#5:1]
Inserted record 'test#21:0{ts:[3]} v1' in 0,002000 sec(s).

orientdb {db=test}> select from #21:0
+----+-----+------+----------------+
|# |@Rid |@Class|ts |
+----+-----+------+----------------+
|0 |#21:0|test |[#5:3,#5:1,#5:0]|
+----+-----+------+----------------+
1 item(s) found. Query executed in 0.002 sec(s).

@StarpTech
Copy link

StarpTech commented Sep 8, 2016

I had the same issue. The statement by orientdb is that the order is not guaranteed.

@habi4ek
Copy link
Author

habi4ek commented Sep 8, 2016

it is not good...
the array always has to guarantee right order

@StarpTech
Copy link

@Ivanov-Yuriy exactly.

@smolinari
Copy link
Contributor

the array always has to guarantee right order

Why? I am not saying you are wrong, but a bit of good explanation about the reasoning might help the ODB team understand your problem with the different ordering of the links.

Scott

@StarpTech
Copy link

Correct me: A set does not guarantee the order by definition. Its no array data structure.

@wolf4ood
Copy link
Member

wolf4ood commented Sep 8, 2016

@Ivanov-Yuriy

Link Set does not guarantee order.
You should use Link List

See here
http://orientdb.com/docs/2.2/Concepts.html#1n-and-nn-referenced-relationships

@habi4ek
Copy link
Author

habi4ek commented Sep 8, 2016

Ok.
I understand why you did that,
but as for me if set had my order, it would be very well
because now
I have to create EMBEDDEDLIST with properties order and link instead only LINKESET

@habi4ek habi4ek closed this as completed Sep 8, 2016
@wolf4ood wolf4ood self-assigned this Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants