Log message #4198735

# At Username Text
# Aug 19th 2019, 14:07 dereuromark using the schema of table, sure.
# Aug 19th 2019, 14:06 val Is there an easy way to check whether the property in Entity class represents a column but not an association?
# Aug 19th 2019, 14:05 davorminchorov TypeMap shows the field as string using the getSchema() method
# Aug 19th 2019, 14:02 davorminchorov Thanks!
# Aug 19th 2019, 14:01 admad cya
# Aug 19th 2019, 14:00 admad the exception is thrown before the final query is even generted
# Aug 19th 2019, 14:00 davorminchorov That's how I usually check queries from the ORM in Laravel but I am asking if there's something similar in CakePHP
# Aug 19th 2019, 14:00 admad @dereuromark true, but that's unlikely
# Aug 19th 2019, 14:00 davorminchorov I am asking how to get the query
# Aug 19th 2019, 13:59 admad i'll move on if you are not interested in trying what i suggest :slightly_smiling_face:
# Aug 19th 2019, 13:58 davorminchorov Is there a toSql / event listener for queries like Laravel?
# Aug 19th 2019, 13:58 dereuromark or if the query is overwriting it somehow, thus the need to see the query :slightly_smiling_face:
# Aug 19th 2019, 13:57 admad actually that's what needed to be checked earlier instead of `getColumn()` :slightly_smiling_face:
# Aug 19th 2019, 13:56 admad check `debug($table->getSchema()->getColumnType('description'))` first
# Aug 19th 2019, 13:55 admad that would only happen if your app/plugin code is explicitly overriding the type
# Aug 19th 2019, 13:54 admad ok, so your table schema seems find, then somewhere in the query the field gets overridden to integer type
# Aug 19th 2019, 13:53 davorminchorov ``` array:8 [▼ "type" => "string" "length" => 255 "null" => true "default" => null "collate" => "latin1_swedish_ci" "comment" => "" "precision" => null "fixed" => null ] ```
# Aug 19th 2019, 13:50 admad or whatever the column/field is with the problem
# Aug 19th 2019, 13:50 admad @davorminchorov show the output of `debug($table->getSchema()->getColumn('description'))`
# Aug 19th 2019, 13:50 davorminchorov @admad clearing schema and orm cache did not help
# Aug 19th 2019, 13:49 admad debugkit has a panel which shows "auto tables" btw
# Aug 19th 2019, 13:49 val thanks, got it
# Aug 19th 2019, 13:49 admad it would return Cake\ORM\Entity instance only if "auto table" is used or you haven't created App\Model\Entity\Entity
# Aug 19th 2019, 13:49 ricksaccous if you have an entity class defined for that model it should use the entity class you created
# Aug 19th 2019, 13:48 val Is `$this->find()->first();` called in table class in 3.x supposed to return an instance of Cake\ORM\Entity but not Model\MyEntity?
# Aug 19th 2019, 13:46 alexdd55976 i am not even far enough to have that
# Aug 19th 2019, 13:45 admad @alexdd55976 assuming sessions are working on your shitty environment, a common cause for session being lost is links to non existent assets on pages
# Aug 19th 2019, 13:44 alexdd55976 `$this->Flash ` is not working either
# Aug 19th 2019, 13:44 alexdd55976 @ricksaccous i can not find any configuration key, that could help here... any idea? its a crappy windows machine with xampp
# Aug 19th 2019, 13:43 davorminchorov done that just now, let me see if that fixes it
# Aug 19th 2019, 13:43 admad or just manually delete files in cache/models
# Aug 19th 2019, 13:42 admad orm_cache
# Aug 19th 2019, 13:42 davorminchorov cache clear_all?
# Aug 19th 2019, 13:41 admad cleared db cache?
# Aug 19th 2019, 13:41 davorminchorov @admad yeah I did check that and they are varchar. @dereuromark I'll try to get the SQL and post it here
# Aug 19th 2019, 13:41 alexdd55976 @ricksaccous actually i was so desperate i candp the code from an old project
# Aug 19th 2019, 13:40 ricksaccous @alexdd55976 i assume you're using authComponent? make sure your settings are set up correctly, and make sure your session settings are set up correctly, I think you'll have to look at your app.php as well as your php configuration ini
# Aug 19th 2019, 13:40 admad @davorminchorov are you sure the db column types are varchar/text ?
# Aug 19th 2019, 13:39 dereuromark @davorminchorov What is the SQL query doing this? Can you post that?
# Aug 19th 2019, 13:39 alexdd55976 guys, what is going wrong if a session is not hold? i log in a user succesfully, but all data is gone after the login. ` $this->Auth->setUser($user);` this should do it, right?
# Aug 19th 2019, 13:38 davorminchorov Nope, nowhere to be found