Hi,
I'm working on a similar solution in ruby.
Could'nd find any difficulty on the orientdb-side:
92 context 'work with multi dimensional Arrays', focus:true do
93 let( :multi_array ){ a = [1,2,3]; b = [ :a, :b, :c ]; [ a, b ] }
94 it 'intitialize' do
95 new_record = TestModel.create ll: multi_array
96 expect( new_record.ll ).to eq [[1, 2, 3], ["a", "b", "c"]]
97
98 end
99
100 it "use saved dataset for update" do
101 dataset = TestModel.create ll: [] # create schemaless
property type embedded
102 expect{ dataset.update set: {ll: multi_array } }.to change{
dataset.version }
103 # explicit reread the dataset
104 data_set = TestModel.last
105 expect( data_set.ll ).to eq [[1, 2, 3], ['a', 'b', 'c']]
106
107 end
108
109 end
11
The test passed:
20:26:27 - INFO - Running: spec/lib/array_spec.rb
Run options: include {:focus=>true}
OrientSupport::Array
I, [2015-08-16T20:26:28.871908 #113777] INFO -- OrientDB#DropDatabase:
Database ArrayTest NOT present --> creating
I, [2015-08-16T20:26:31.802297 #113777] INFO -- OrientDB#CreateDatabase:
Database ArrayTest successfully created and stored as working database
work with multi dimensional Arrays
intitialize
use saved dataset for update
Finished in 3.71 seconds (files took 0.32951 seconds to load)
2 examples, 0 failures
ActiveOrient uses the http REST-API.
On Saturday, August 15, 2015 at 11:16:17 PM UTC+2, Tim wrote:
>
> Hey all,
>
> i just came across orient db a few days ago and now i am trying to migrate
> a xml based persistence mechanism of a legacy application to orientdb (the
> object db seemed quite a good idea for that purpose).
>
> When serializing a few classes i get the following exception: "Caused by:
> java.lang.IllegalArgumentException: Type EMBEDDED must be a multi value
> type (collection or map)"
>
> I guess the serializer has problems with the following fields:
>
> private double lossProbability[][];
> private double downgradeRisk[][];
>
>
> Would appreciate a heads up on how i can solve that problem.
>
> Thanks in advance!
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.