-
Notifications
You must be signed in to change notification settings - Fork 2
Issue with bulkinsert and bulkupdate #26
Comments
hi @akandach, thanks for reporting the issue. we'll have a look at it and provide you more information. |
Hi @akandach, I've tried to reproduce your issue related to It would be also nice if you could provide us with some gist of how you've defined the types and how you use the repository to insert the data. |
Here is what i am doing. Hope this helps package com.clidentity.server.model; import org.springframework.data.annotation.PersistenceConstructor; @table(name = "connect_notifications", refreshInterval = 500, numberOfReplicas = "0-all")
} |
@akandach You use the @transactional annotation, Crate.IO does not support transactions. Could you also show the code of the BaseEntity class? All in all, there mustn't be any problems with the injection of such simple entities, you also could have seen that from the above-provided code snippets. Please, check the docs/readme of the Spring Crate data project once again. |
Here is the BaseEntity. Yes my object model is simple only. No complextypes. /***/ import org.hibernate.validator.constraints.NotBlank; /**
|
Looks like if we do not set all the values for the given object then i think we have issue. |
hi @akandach, we can confirm this issue. at the moment we are rethinking the whole spring data integration. we should have gone with jpa right away. we won't follow this path. feel free to contribute on this issue, otherwise we'll have to ask you to wait for the jpa integration. |
thanks joemoe, when can we expect jpa integration? |
i am using spring crate and calling bulkInsert but i am seeing the below error.
org.springframework.data.crate.CrateSQLActionException: io.crate.shade.org.elasticsearch.transport.RemoteTransportException: [Boost][inet[/127.0.0.1:4300]][crate_bulk_sql]
if u look at the query 'INSERT INTO connect_notifications ("datejoined","enterprisename","entity_class","fromprofileid","fromuserid","id","message","modificationtime","requestaccepted","requestsent","toemail","toprofileid","type") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)' with args '[[com.clidentity.server.model.Notification, 07311936-09f6-4c75-b5c3-ae6ae222d800, d69a6e9f-e7f3-479f-afd3-2b093633ef7a, 3bea25a2-7d8f-431e-8ca3-5ccb9f87face, batta prasad, 2f681c0f-2efa-459b-b59a-fd8f02f7425a, CONNECT]]'
input parameters seems to be wrong.
It very easy to reproduce the issue. Just create array of object to persist using bulk insert. May be same with bulk update.
If you look at the parameter value i am setting only few properties but it is taking all the parameters from the object and constructing it in the query and also the order is not correct. The object class is the first arg but where in the query it is third argument.
Hope this will help you in reproducing the issue. Please do let me know once it is fixed.
Also can you guys push the jar file to the repository so that we can include the dependency in the pom file.
The text was updated successfully, but these errors were encountered: