-
Notifications
You must be signed in to change notification settings - Fork 12
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
sqlite3 auto-increment slots in ooddl not working #7
Comments
Looking into this further, it seems that with the stripped down view class above (clsql:def-view-class foo2 ()
((id :accessor id :initarg :id :type integer
:db-constraints (:not-null :auto-increment))
(bar :accessor bar :initarg :bar :type integer))) Now, if I do If I initialize slot Summary:
uuh |
As you are discovering, there is a lot of silent "by convention" semantics in CLSQL. Its large and complex and has lots of cases like this where things don't work as expected if they are not used as expected ("expected" being how the authors thought). If you add warnings or errors as patches, or figure out something to add to the documentation that will help, I will gladly merge them. |
I've tried to use auto-increment slots on the sqlite3 backend, and they seem to be working only partially. The following code is not working:
It seems that the issue has been mentioned on the mailing list in 2010 http://article.gmane.org/gmane.lisp.clsql.general/1221 and traces of the patch suggested back then (before code refactoring) seem to be around, yet behavior is wrong.
I'm struggling to suggest an appropriate fix. My analysis is that
update-autoincrement-keys
is not called, since%update-instance-helper
decides the slot is not one that needs updating. That is a decision apparently made at view-class construction time. I can't currently test against a different backend to see whether (and why) it works there.Any hints? I'm ready to try and fix it with some guidance.
(for the record: this is on OSx, sbcl 1.3.3, quicklisp's march release, which contains clsql from kpe.io master branch in january 2016 AFAICS)
uuh
The text was updated successfully, but these errors were encountered: