Skip to content
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

createWithNamedValue fails with ClassCastException #356

Open
shunjikonishi opened this issue Apr 25, 2017 · 1 comment
Open

createWithNamedValue fails with ClassCastException #356

shunjikonishi opened this issue Apr 25, 2017 · 1 comment

Comments

@shunjikonishi
Copy link

shunjikonishi commented Apr 25, 2017

I'm using skinny ORM with table which doesn't have auto generated key.

So, I've override useAutoIncrementPrimaryKey and primaryKeyFieldName like this.

  override def useAutoIncrementPrimaryKey: Boolean = false
  override def primaryKeyFieldName = "bookId" // bookId is Long

With this model, createWithNamedValue method fails with strange behavior.

If I don't get its result value, it succeed.
But if I assign its result value into some variables, It fails with ClassCastException.

I've tried to add afterCreate and print id value. So, it says id value is ParameterBinder.(It should be Long)

afterCreate: Some(ParameterBinder(value=1))

I don't know why it doesn't cause compile error...

Minimum example is here

@seratch
Copy link
Member

seratch commented May 10, 2017

Sorry for my late reply. We will apply some fixes on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants