-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrientDB generates temporaty @rid during transaction #6120
Comments
Version of orientdb: 2.2.0-rc1 |
Thanks @schernolyas we will check ASAP |
Hi @tglman ! |
Do you have logs? My theory is that the first time it creates a new class in background and to do this operation, the TX is committed and restarted. @schernolyas Could you please check it? Could you create the OrientDB class before the TX? |
HI @lvca ! JPA EntityManager can not work without transaction and throw Exception. |
I cannot find |
@lvca Can You return to hangout? |
Copy from hangout (chat): Luca please find row by " 14:01:42,248 DEBUG" About "I cannot find must be executed outside active transaction" ....What do You mean? |
@lvca Yes YOu are right absolutly
|
And it was without transaction. I know that OrientDB not allow change schema during transaction |
Hi @lvca ! Have You any questions about the problem? |
Hi @lvca ! Have You any progress? Which milestone will conteins fix for the issue? A lot of thanks! |
To recap, what's the sql you execute? just 1 statement insert? Can you copy and paste only the relevant snippet here? |
Hi @lvca !
Body of stored procedure executeQuery: Problem that there RID is actual during the transaction only. |
Why are you creating 3 new functions in Groovy just to execute 3 SQL? |
@lvca , because OrientDB implenentation of JDBC driver not allow to execute queries like mine |
Why not? Have you tried:
|
@lvca Yes of course! It is first that I did. I got exception. |
Ok, just created: #6205 |
Done: #6205 |
Could you try it (it's in last develop branch) |
@lvca Okey. I will try. I will attach results . |
@lvca I got exception. See part of stack trace Caused by: com.orientechnologies.orient.core.exception.OCommandExecutionException: Cannot execute non idempotent command |
I created this test case and passed: @Test
public void testInsertRIDReturning() throws Exception {
conn.createStatement().executeQuery("CREATE CLASS Insertable ");
ResultSet result = conn.createStatement().executeQuery("INSERT INTO Insertable(id) VALUES(1) return @rid");
assertThat(result.next()).isTrue();
assertThat(result.getObject("id")).isNotNull();
} |
@lvca The exception show all |
Hi @lvca ! Have You any decision about the issue? |
Hi @lvca ! What is status of the bug? |
I'd like to follow up on this. Is this issue still relevant? Can I close it? |
Hi Luca!
If You think that it is not bug than close it.
With best regards, Sergey Chernolyas
18.02.2017 11:04 пользователь "Luca Garulli" <notifications@github.com>
написал:
… I'd like to follow up on this. Is this issue still relevant? Can I close
it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI4fSz2hdTKHsw5Hy4_SM694rVOZx9pxks5rdqYMgaJpZM4IcJmC>
.
|
Forwarding to @luigidellaquila. |
Hi @lvca This issue is specific to tx behavior, that is a basic behavior in OrientDB so it cannot be changed. Thanks Luigi |
I demonstate the problem. For example Entity A and Entity B have 'one-to-many' link.
|
OrientDB generates temporaty @Rid during transaction. In this way, Hibernate OGM links entities by the @Rid. And .... the link is incorrect after transaction commited.
Test examle is OrientDbLinkTest.java. At the example, Entity 'Card' has incorrect links (see row 108)
Full hibernate ogm debug output attached.
org.hibernate.datastore.ogm.orientdb.OrientDbLinkTest-output.txt
The text was updated successfully, but these errors were encountered: