Hi Dmitry,
What is your question ?
Will it work if you do ?
Entity e = new Entity();
db.save(entity);
Yes it will, but you should reassign entity after that, I mean you should do
entity = db.save(entity);
About case
Entity e = new Entity();
e.setId(); --where field id marked as @Id
...
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
Hi!
I was not talking about the transfer of DTO from repository to WEB layer.
And in a reverse direction (from WEB to database).
May be you can provide example?
All your examples consist of code:
Entity e = db.newInstance(Entity.class);
db.save(e);
But if I do so:
Entity e = new Entity();