[orientdb] OrientDB. Setting ConflictStrategy throwing an exception

2016-07-28 Thread Mikayel Nersisyan
I have OObjectDatabaseTx. I want to set my own conflict strategy using api.

OObjectDatabaseTx db;
db.setConflictStrategy(new ORecordConflictStrategy() {
@Override
public byte[] onUpdate(OStorage storage, byte iRecordType, 
ORecordId rid, ORecordVersion iRecordVersion, byte[] iRecordContent, 
ORecordVersion iDatabaseVersion) {
;
}

@Override
public String getName() {
return "SOME NAME";
}
});

On execution i'm getting an exception sarying that operation is not 
supported.

10:40:48,718 INFO 
 [com.ats.vis.services.transaction.TransactionManager] 
(TransactionExecutor[UML]) [__MAIN_WS__] ERROR:: 
java.lang.UnsupportedOperationException: setConflictStrategy
at 
com.orientechnologies.orient.client.remote.OStorageRemoteThread.setConflictStrategy(OStorageRemoteThread.java:318)
 
[orientdb-client-2.1.19.jar:2.1.19]
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.setConflictStrategy(ODatabaseDocumentTx.java:1122)
 
[orientdb-core-2.1.19.jar:2.1.19]
at 
com.orientechnologies.orient.object.db.OObjectDatabaseTx.setConflictStrategy(OObjectDatabaseTx.java:760)
 
[orientdb-object-2.1.19.jar:2.1.19]

Is there any way to set conflict strategy?

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Question on how to use OrientDB in JavaFX with thread issues

2016-07-28 Thread Sahand Delta
To make the issue clear, here a little Table

*   |JavaFX   |   plain Java  |*
plocal   |   works |   works|
remote |fails   |   works|


I have no idea what could be the reason behind this?

Does someone else have any idea or successfully tried the combination of 
OrientDB remote connection withhin JavaFX?

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Estimated release date of v3.0?

2016-07-28 Thread Auke te Winkel
Thanks! Apparently I was looking at an old roadmap page :)

On Wednesday, 27 July 2016 16:00:56 UTC+2, alessand...@gmail.com wrote:
>
> Hi,
> you could see http://orientdb.com/docs/2.2/Roadmap.html
>
> Hope it helps.
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Spatial Module Doc available in 2.2.x examples mixes lat/long

2016-07-28 Thread Enrico Risa
Hi Tore

that was the legacy spatial indexing.

EPSG:4326
Seems to be te standard widely used also in other GIS system.





2016-07-28 11:21 GMT+02:00 Tore Austrått :

> Hello Enrico,
>
> in your latest blog post(7/25) you state " ... coordinates (latitude,
> longitude) ".
> It seems that this is the common understanding. All positions from Google
> comes in this format(see attached png) and hence this was the way I
> understood it.
> In my view this will cause confusion as you can't expect every developer to
> be a full fledged navigator. So why not say this explicitly - ODB does it
> the opposite way?
>
> How come OrientDB selected EPSG:4326 ?
>
> T.
>
>
> On 27 July 2016 at 21:01, Enrico Risa  wrote:
>
>> Hi Tore
>>
>> the docs is not incorrect.
>> The Spatial Module uses the spatial reference system EPSG 4326
>>
>> http://spatialreference.org/ref/epsg/wgs-84/
>>
>> and the x & y are projected in longitude (-180 +180) and latitude( -90
>> +90).
>>
>> See here
>>
>> http://geojson.org/geojson-spec.html#positions
>>
>> and here
>>
>> http://edndoc.esri.com/arcsde/9.1/general_topics/what_coord_sys.htm
>>
>> Thanks
>> Enrico
>>
>> 2016-07-27 20:33 GMT+02:00 Tore :
>>
>>> http://orientdb.com/docs/2.1/Spatial-Module.html
>>>
>>> The examples are mixing latitude and longitude.
>>> Please check this: (it appears the restaurant is located in Ethiopia)
>>> This goes for all the examples. Please correct.
>>> Thanks.
>>>
>>> INSERT INTO  Restaurant SET name = 'Dar Poeta', location = {"@class": 
>>> "OPoint","coordinates" : [12.4684635,41.8914114]}
>>>
>>> --
>>>
>>> ---
>>> 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 orient-database+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OrientDB" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/orient-database/0suULkswLxU/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> orient-database+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Tore Austrått
> phone +47 90657231
>
> --
>
> ---
> 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 orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread Luigi Dell'Aquila
Of course this is true only if the parent class is empty, otherwise you
have to define a non-unique index on the parent class as well

Thanks

Luigi


2016-07-28 8:58 GMT+02:00 Luigi Dell'Aquila :

> There is just no need to define indexes on the parent class, as long as
> you have indexes on the same properties on the subclass.
> Eg. if you have a class A with two subclasses A1 and A2 and both
> subclasses have an index on "name", if you do a
>
> SELECT FROM A WHERE name = 'foo'
>
> it will use the indexes on the subclasses
>
> Thanks
>
> Luigi
>
>
> 2016-07-28 8:48 GMT+02:00 hartmut bischoff :
>
>> Thanks for the quick response.
>>
>> Unfortunately, this leads to other Questions, probably due to a lac of
>> skills on my side
>>
>> 1. How does this affect queries based on the superclass?
>> The Match-Query presented in another topic is already slow.
>>
>> 2. Do I have to define two indexes, one on the superclass (non-unique)
>> and in addition one on every Subclass (unique).
>>
>> 3. Can I use the same name for the indexes on the subclass-level and are
>> they  combined if a query on the superclass is performed. in case there is
>> no index defined for the superclass?
>>
>>
>>
>> --
>>
>> ---
>> 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 orient-database+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread Luigi Dell'Aquila
There is just no need to define indexes on the parent class, as long as you
have indexes on the same properties on the subclass.
Eg. if you have a class A with two subclasses A1 and A2 and both subclasses
have an index on "name", if you do a

SELECT FROM A WHERE name = 'foo'

it will use the indexes on the subclasses

Thanks

Luigi


2016-07-28 8:48 GMT+02:00 hartmut bischoff :

> Thanks for the quick response.
>
> Unfortunately, this leads to other Questions, probably due to a lac of
> skills on my side
>
> 1. How does this affect queries based on the superclass?
> The Match-Query presented in another topic is already slow.
>
> 2. Do I have to define two indexes, one on the superclass (non-unique) and
> in addition one on every Subclass (unique).
>
> 3. Can I use the same name for the indexes on the subclass-level and are
> they  combined if a query on the superclass is performed. in case there is
> no index defined for the superclass?
>
>
>
> --
>
> ---
> 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 orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread hartmut bischoff
Thanks for the quick response.

Unfortunately, this leads to other Questions, probably due to a lac of 
skills on my side
  
1. How does this affect queries based on the superclass?
The Match-Query presented in another topic is already slow. 

2. Do I have to define two indexes, one on the superclass (non-unique) and 
in addition one on every Subclass (unique). 

3. Can I use the same name for the indexes on the subclass-level and are 
they  combined if a query on the superclass is performed. in case there is 
no index defined for the superclass?



-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] What is the stable version for production?

2016-07-28 Thread Luigi Dell'Aquila
Hi Eswar,

You can always find latest stable version here

http://orientdb.com/download/

This version is preferred for production purposes.
Note: if you hold for a few hours you'll find 2.2.6, we are releasing it
now ;-)

Thanks

Luigi



2016-07-28 8:35 GMT+02:00 eswar reddy :

> may I know which  version is stable version  for Production environment
>
> --
>
> ---
> 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 orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] What is the stable version for production?

2016-07-28 Thread eswar reddy
may I know which  version is stable version  for Production environment

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread Luigi Dell'Aquila
Hi Hartmut,

There is no specific configuration to specify that an index is unique at
class level, but you can just avoid to define the index on the superclass,
as the query engine will use the subclasses index if needed (first level
inheritance only)

Thanks

Luigi



2016-07-28 7:07 GMT+02:00 hartmut bischoff :

> As mentioned before, my test-suite-Vertices have the following structure:
> - V
>   - - - Contract
> - - ContractDetail
> - - Sector
>   - - Category
> - Industry
> - Subcategory
>
> Contracts got an unique Index "Con_id" and Sector "name".
>
>
> names are unique on class-level only.
> My "quick" solution was to extend the index on Sector to "name, k",
> where k is a shortcut of the class.
>
>  93 orientdb.create_properties( :Sector, name: {type: :string}, k:
> {type: :string})
>  94 orientdb.create_index( :Sector,  name: 'sectorindex', on:
> [:name, :k], type: :unique  )
>
>
>
>
> Then I can use the atomic upsert  (with ruby code:)
>
> 136 sub_cat_record = ActiveOrient::Model::Subcategory.upsert(
> set: { :k => 'S' },
> 137  where: { :name =>
> contract.contract_detail.subcategory }) do | new_sub_cat |
> 138 category_record =
>  ActiveOrient::Model::Category.upsert( set: { :k => 'C' },
> 139 where: { :name =>
> contract.contract_detail.category }) do | new_category |
> 140 industry_record =
> ActiveOrient::Model::Industry.upsert( set: { :k => 'I' },
> 141   where: { :name =>
> contract.contract_detail.industry }) do | new_industry |
>
>
> Obviously this is a sloppy workaround.
>
> Is there a way to specify an Index which is unique on class-level ?
>
> --
>
> ---
> 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 orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.