Hi machak, I think you misunderstood it. My case is trying to *set a null value* for a field name of document, your suggestion will not do that, that will return a field value instead.
By looking at the ODocument class, you will see there are 4 overloading methods of field() 1. *Getters*: - 1.1 field ( fieldName ) - 1.2 field ( fieldName, conversionType ) - 1.3 field ( fieldName, conversionType:OType ) 2. *Setters*: - 2.1 field ( fieldName, fieldValue ) - .... My Best, Hung Tran On Wednesday, January 6, 2016 at 2:35:23 AM UTC+7, machak wrote: > > Hi, > > On Tuesday, January 5, 2016 at 7:00:14 PM UTC+1, Hung Tran wrote: >> >> Hi, >> >> I got an ambiguous error with this code >> >> document.field(fieldName, null);// should it be "document.field(fieldName, >> (object)null)" >> >> the error is >> >> The call is ambiguous between the following methods or properties: >> 'com.orientechnologies.orient.core.record.impl.ODocument.field(string, >> com.orientechnologies.orient.core.metadata.schema.OType)' and >> 'com.orientechnologies.orient.core.record.impl.ODocument.field(string, >> java.lang.Class)' >> >> Any help will be very appreciated! >> > > > you need to cast null to either > com.orientechnologies.orient.core.metadata.schema.OType > or java.lang.Class > otherwise it is not possible to know which method you want to execute > so, call it like: > document.field(fieldName, (com.orientechnologies.orient. > core.metadata.schema.OType)null) or with class cast.. > hth, > /m > > >> >> My Best, >> Hung Tran >> >> >> -- --- 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.
