59 new_record = TestModel.new_instance ll: [ ] # new document with an empty array 60 (1..9).each do |i| 61 new_record.ll << LinkClass.new_instance( att: "#{i} attribute" ) 62 new_record.ll << i 63 end
1 attribute ; 1 ; 2 attribute ; 2 ; 3 attribute ; 3 ; 4 attribute ; 4 ; 5 attribute ; 5 ; 6 attribute ; 6 ; 7 attribute ; 7 ; 8 attribute ; 8 ; 9 attribute ; 9 | METADATA | PROPERTIES | ||||
|---|---|---|---|---|---|
@rid | @version | @class | ll | created_at | updated_at |
7 | [5,"t",78] | 2015-07-31T09:13:14.736 02:00 | 2015-07-31T09:13:14.736 02:00 | ||
19 | |||||
select from (select expand(ll) from ModelTest ) where att like '4%'
{ "result": [ { "@type": "d", "@rid": "#10:3", "@version": 1, "@class": "TestLinkClass", "att": "4 attribute" },