Closed laurenskvh closed 7 years ago
Hi @laurenskvh ,
Thanks for your question. First off, the server is responding:
RethinkDb.Driver.ReqlServerCompileError: 'Unrecognized optional argument primary_key.'
After looking at the official Java documentation, I don't see any primary_key
optional argument for .insert(...)
. See: https://rethinkdb.com/api/java/insert/. So, the server's error response to your query seems to be expected.
If you're looking for a way to change the primary key field used by RethinkDB, you'll need to specify the primary key field when creating a table as described here: https://rethinkdb.com/api/java/table_create/ and the OptArg for .TableCreate
is primaryKey
not primary_key
.
Also, just as a quick reminder: We use the issue tracker here for only confirmed bug reports and feature requests. We try to avoid creating help related issues here. This is really important because everytime a new GitHub issue is created 21 people are notified via email. I'd like not to email everyone with user-help questions since I really need their input when making big decisions/changes about this driver. This is really important to me.
With that said, if you require help you should join us on our slack channel here: http://slack.rethinkdb.com Please feel free to ask questions in #general or #help. Also, feel free to tag @bchavez (me) in your question if you like.
Thanks, Brian
:beach_umbrella: :trumpet: Beach Boys - Good Vibrations (Nick Warren bootleg)
The code I'm using:
r.Db(Config.Default.DatabaseName).Table(item.table).Insert(jsonFile["rows"]).OptArg("primary_key", "id").Run(conn);
The error:
RethinkDb.Driver.ReqlServerCompileError: 'Unrecognized optional argument
primary_key.'
Is this different from the java driver. If so, how?
edit: I know ID will automatically be the primary key, but for some reason every Update I do runs terribly slow. I was thinking it might have something to do with replacing the natural UUID with my own ID's.