-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bug: Model save method not working if PRIMARY KEY is VARCHAR #2835
Comments
@crustamet Can you please table schema here? |
Well, actually, for uuid, you should use binary instead of varchar. But if you can give reproducible use case, probably someone or you can propose a fix. |
Not a bug. If you use Just use Oh... btw, I'm not sure if the default model will play nice with |
this is shit, just use insert insted of save lol, this beats the purpose of using save, i have to work extra because codeigniter still doesn't know if i have a record in databse ? or not ? whats the point of even using save() then ? |
there are two keys varchar primary key that is not autoincrement. and a date datetime. |
@crustamet This is an open-source project. If you don't like how some things work and see a place for improvements, you can always send a PR. |
No man, i am sorry, it is all good, I can`t send a PR because my method will not be good :) They think everything trough already. The only problem that i am complaining about it is the return IS TRUE while it didn`t do anything. I went down the rabbit hole :) The thing here is when the query gets executed, it execute with success and the save method return true if no errors occurred, but it should return how many rows changed in the database. Anyway it is good like this. |
Until the end of the day this is a legit issue or not ? |
Not. Everything is working as it supposed to work and as described in the docs. Also the default Model class supports only auto-increment fields for a primary key. |
@crustamet What are you using to generate the uuids? I find the option that the model methods can work with something other than auto_increments quite interesting. |
i get the uids from an API |
Hello again codeigniter TEAM
i am trying to save some data into mysql database table
i have array
Here is my code
The result telling me it was a success but when im going to table i see empty table.
The text was updated successfully, but these errors were encountered: