Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Entity instantiation via find() is wonky
Post: RE: Entity instantiation via find() is wonky

kenjis Wrote: (03-22-2024, 05:10 PM) -- There is no flag or setting like that. But you will be able to specify constructor in v4.5.0 if you use Model Field Casting (DataConverter). See https://gi...
470 Views
2 Replies
03-25-2024, 07:25 AM
stevenmalin
  Information Thread: Entity instantiation via find() is wonky
Post: Entity instantiation via find() is wonky

I have an Entity class where I instantiate an object based on inputs to the constructor. Something like this: PHP Code: -- class MyEntity extends \CodeIgniter\Entity\Entity {     protected SomeCla...
470 Views
2 Replies
03-22-2024, 03:42 PM
stevenmalin
    Thread: Entity misbehavior after upgrading from 4.1.9 to 4.2.1
Post: RE: Entity misbehavior after upgrading from 4.1.9 ...

kenjis Wrote: (07-13-2022, 07:18 PM) -- The change is for fixing this. https://forum.codeigniter.com/thread-80835.html -- Awesome, thank you!
1,462 Views
2 Replies
07-14-2022, 06:04 AM
stevenmalin
    Thread: Entity misbehavior after upgrading from 4.1.9 to 4.2.1
Post: Entity misbehavior after upgrading from 4.1.9 to 4...

Just noticed my application started behaving oddly after upgrading to 4.2.1.  Entity attributes that I know have a value are reporting as not having a value. For example, I have an entity like this: ...
1,462 Views
2 Replies
07-13-2022, 03:01 PM
stevenmalin
    Thread: Validation - check at least one field has a value?
Post: RE: Validation - check at least one field has a va...

I did see required_without but didn't try it out, it didn't seem to fit what I wanted to do. I just tried it out in a controller with these rules: Code: -- $this->validate([     'param1' => 'perm...
3,787 Views
4 Replies
06-30-2022, 03:49 PM
stevenmalin
    Thread: Validation - check at least one field has a value?
Post: RE: Validation - check at least one field has a va...

I built a new method into BaseController to call validate() first, then if it returns true, ensure that at least one of the $rules array keys have an accompanying value, but this is kind of a narrow u...
3,787 Views
4 Replies
06-30-2022, 10:10 AM
stevenmalin
    Thread: Validation - check at least one field has a value?
Post: Validation - check at least one field has a value?

Hey all, I have situations where a controller can accept multiple inputs, each input has the permit_empty modifier, but I need at least one input with a value to be able to do anything useful.  For e...
3,787 Views
4 Replies
06-30-2022, 09:41 AM
stevenmalin
    Thread: Caching improvements
Post: RE: Caching improvements

Thank you! Didn't realize that was possible but it's very helpful. I missed that in the docs. Unless there's any reason not to, I'm going to go ahead and work on cluster compatibility and using the p...
4,955 Views
6 Replies
12-10-2021, 08:11 AM
stevenmalin
    Thread: Caching improvements
Post: Caching improvements

Hello, I'm new to CodeIgniter, liking what I'm seeing so far, but some caching things are standing out to me.  I'd like to create a pull request to address these things but wanted to run it by everyo...
4,955 Views
6 Replies
12-09-2021, 03:18 PM
stevenmalin

Theme © iAndrew 2016 - Forum software by © MyBB