Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: A check if model has anything to update
Post: RE: A check if model has anything to update

@"kilishan" that comes from your commit f33fb0036185 ("[ci_skip] Upated entity docs after refactor.") (https://github.com/codeigniter4/CodeIgniter4/commit/f33fb00361852514e0a26916b0b8936e8d564d76). ...
6,198 Views
10 Replies
04-19-2022, 04:38 AM
rmilecki
    Thread: A check if model has anything to update
Post: RE: A check if model has anything to update

kenjis Wrote: (04-18-2022, 04:31 PM) -- Entity represents a single database row. So I must say you should not fill properties that does not exist in database field. And a form is not a database ta...
6,198 Views
10 Replies
04-19-2022, 02:45 AM
rmilecki
    Thread: A check if model has anything to update
Post: RE: A check if model has anything to update

kenjis Wrote: (04-17-2022, 11:46 PM) -- Entity class is simply a class that represents a single database row. -- I know. kenjis Wrote: (04-17-2022, 11:46 PM) -- You should fill only database fiel...
6,198 Views
10 Replies
04-18-2022, 02:06 AM
rmilecki
    Thread: A check if model has anything to update
Post: RE: A check if model has anything to update

kenjis Wrote: (04-17-2022, 11:12 PM) -- > $allowedFields doesn't include one of fields used in Entity Do you mean `agree` is a database field? If so, and you want to save it, you need to add it i...
6,198 Views
10 Replies
04-17-2022, 11:15 PM
rmilecki
    Thread: A check if model has anything to update
Post: RE: A check if model has anything to update

kenjis Wrote: (04-17-2022, 06:09 PM) -- $allowedFields has only name, and name is not changed. So There is no data to update. -- You misunderstood me. I understand what and why happens. I'm looking f...
6,198 Views
10 Replies
04-17-2022, 09:37 PM
rmilecki
    Thread: A check if model has anything to update
Post: A check if model has anything to update

After one of CodeIgniter updates I started getting CodeIgniter\Database\Exceptions\DataException ("There is no data to update."). That is caused by the commit b5b6ddfa3fb8 ("Add additional empty check...
6,198 Views
10 Replies
04-17-2022, 02:20 PM
rmilecki
    Thread: Query result as an indexed array or object by index of choice
Post: RE: Query result as an indexed array or object by ...

paulbalandan Wrote: (11-16-2020, 11:16 AM) -- There is already a findColumn method which uses array_column for single result. Maybe we can have an analogous findAllColumn() which will do the indexing...
6,476 Views
4 Replies
11-16-2020, 01:26 PM
rmilecki
    Thread: Query result as an indexed array or object by index of choice
Post: RE: Query result as an indexed array or object by ...

I'd love to see such feature. I think that: By default $primaryKey should be used Instead of getResultKey() replacing findAll() we should get a modifier (similar to the asArray()) Consider ...
6,476 Views
4 Replies
11-14-2020, 02:59 PM
rmilecki
    Thread: Authorization and per-subproject roles assignment (Myth::Auth?)
Post: RE: Authorization and per-subproject roles assignm...

MGatner Wrote: (11-07-2020, 04:54 PM) -- Check out Tatter\Permits on Packagist. This is precisely the point of it: allowing object-level permissions. It is designed to take chmod/POSIX style modes fo...
5,536 Views
4 Replies
11-08-2020, 05:04 AM
rmilecki
    Thread: Authorization and per-subproject roles assignment (Myth::Auth?)
Post: Authorization and per-subproject roles assignment ...

I work on a service that allows creating per-company boards: Boards look the same for each company Company board data is 100% independent from other companies (could be even separated DB) Users...
5,536 Views
4 Replies
11-07-2020, 04:32 PM
rmilecki
    Thread: Integrating dompdf
Post: Integrating dompdf

I want to try using dompdf for generating PDFs. It's simpler than TCPDF and wkhtmltopdf so a good choice for me if it works good enough. I downloaded it to app/ThirdParty/ and in Autoload.php I add...
9,610 Views
4 Replies
05-03-2020, 03:03 AM
rmilecki
    Thread: fpdf custom header
Post: RE: fpdf custom header

pippuccio76 Wrote: (05-01-2020, 09:24 AM) -- PHP Code: --     function __construct($orientation = 'P', $unit = 'mm', $size = 'A4',$intestazione) { -- -- FWIW this constructor doesn't make sense. If ...
3,823 Views
1 Replies
05-02-2020, 08:05 AM
rmilecki
    Thread: Using Pagination with custom findAll()
Post: Using Pagination with custom findAll()

In my model I use custom findAll() as I need an extra join: PHP Code: -- public function findAll(int $limit = 0, int $offset = 0) {     $this->select('documents.*');     $this->select('authors.na...
1,407 Views
0 Replies
04-27-2020, 03:00 PM
rmilecki
    Thread: Model(s) for one business logic with few database tables
Post: Model(s) for one business logic with few database ...

I use CodeIgniter 4 and I really like its Model class with all CRUD helpers. My problem is I don't know how to design model(s) for business logic that uses multiple database tables. Let's say I wan...
1,490 Views
0 Replies
04-17-2020, 04:32 AM
rmilecki
    Thread: CI4: Handling model errors
Post: CI4: Handling model errors

I'm a bit confused on how to properly handle errors that happen in a model: According to the "Error Handling" part of documentation model should throw an exception on error CodeIgniter4 in its Model...
6,023 Views
9 Replies
04-17-2020, 03:06 AM
rmilecki
    Thread: Support subqueries in BaseBuilder::from()
Post: Support subqueries in BaseBuilder::from()

SQL databases support subqueries in FROM so it'd be great to have support for something like: PHP Code: -- $builder->from(function(BaseBuilder $builder) {     $builder->select('*');     $builder->...
1,959 Views
1 Replies
04-17-2020, 02:28 AM
rmilecki

Theme © iAndrew 2016 - Forum software by © MyBB