Thank you for taking the time to reply Montrazul.  I believe this 
suggestion is the same as defining the schema beforehand, which I confirmed 
does work correctly.  I was hoping there was a way to leverage the 
"schema-less" design here, as the documentation states "Set<Object> should 
resolve to EmbeddedSet, while Set<? extends ORecord> should resolve to 
LinkSet".

Brian

On Monday, May 12, 2014 12:07:48 PM UTC-4, Montrazul wrote:
>
> Cause you did not define the elements of the set to be string?
>
> orientVertexType.createProperty("myProperty", OType.EMBEDDEDSET, OType.
> STRING);
>
> Am Montag, 12. Mai 2014 18:02:18 UTC+2 schrieb Brian O'Keefe:
>>
>> FYI -- I forgot a couple lines showing an alternate approach that also 
>> did not work...
>>
>>         Set<String> set2 = new HashSet<String>();
>>         set2.add("AnotherTry");
>>         v.getRecord().field("myEmbeddedSet2", set2, OType.EMBEDDEDSET);
>>
>> This also resulted in a LinkSet property for myEmbeddedSet2.
>>
>> On Monday, May 12, 2014 11:46:05 AM UTC-4, Brian O'Keefe wrote:
>>>
>>> Consider the following code in 1.6 using Tinkerpop Graph API
>>>
>>> Map<String, Object> props = new HashMap<String, Object>();
>>> props.put("myEmbeddedSet", new HashSet<String>());
>>> ((HashSet<String>)props.get("myEmbeddedSet")).add("myString");
>>> OrientVertex v = 
>>> graphOrientsession.getGraphNoTx().addVertex("class:myVertices", props);
>>>
>>> via https://github.com/orientechnologies/orientdb/wiki/Types, I would 
>>> expect "myEmbeddedSet" to be an embedded set.  However, when inspecting the 
>>> database, this is added as a LinkSet with a single record with the value 
>>> "myString" (not a link at all).  Is there something obvious that I am doing 
>>> wrong here?  If I define the schema beforehand, it works correctly.
>>>
>>> Thanks,
>>>
>>> Brian
>>>
>>

-- 

--- 
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.

Reply via email to