Hi,
You can use detach/attach functionality.
Call com.orientechnologies.orient.object.db.OObjectDatabaseTx#detach method
and you will not have to copy data so you can use it as web layer DTO.
Also you do not need to load entity to save it, just save it without load,
you asked how to load entity that is why I mentioned load method.




On Sat, Jan 11, 2014 at 3:24 PM, Dmitry <nosko...@gmail.com> wrote:

> Andrey, maybe there are other options?
>
> I will explain:
> We have a typical web applications (that implements MVC pattern)
> And for example we use Spring MVC for it.
>
> Applications consists of:
> Controller (where implemented databinding from request parameters to our
> POJO model)
> Service/DAO layers for operation of the database.
>
> For your advice, we must perform mechanical work, because we:
> 1) load entity
> 2) copy field to field from one POJO (from WEB layer) to other POJO
> (loaded from OrientDb)
> 3) save loaded entity
>
> I understood you correctly?
>
>
> On Friday, December 27, 2013 7:35:50 PM UTC+3, Andrey Lomakin wrote:
>>
>> Ok.
>> So you want to load Pojo, update fields and save it.
>> It can be done by calling the method com.orientechnologies.orient.
>> object.db.OObjectDatabaseTx#load(java.lang.Object) and Pojo is saved by
>> calling method com.orientechnologies.orient.object.db.OObjectDatabaseTx#
>> save(java.lang.Object).
>>
>> About annotations @Oid and @OVersion. First is used to map record id to
>> pojo field and second is used to map version to pojo field.
>>
>  --
>
> ---
> 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/groups/opt_out.
>



-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
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/groups/opt_out.

Reply via email to