[Bug 31142] New: Don't generate object for depth > 1
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31142 Bug ID: 31142 Summary: Don't generate object for depth > 1 Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org We shouldn't need to generate objects the is more than one level deep in the structure. For instance if we generate a patron, then the library, we certainly don't need to generate the SMTP server. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31142 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 137633 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137633&action=edit Bug 31142: Don't generate objects if more than 1 level deep -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31142 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion CC| |m.de.rooy@rijksmuseum.nl, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Spoiler: this does not work. For the example in comment 0: SMTP servers are not generate anyway (not a 1-n relationship but n-n and so it's not generated by TestBuilder). For t/db_dependent/Circulation.t we are passing from 502 objects to 504, no gain expected. The change in the DB structure looks correct however. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31142 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #0)
We shouldn't need to generate objects the is more than one level deep in the structure. For instance if we generate a patron, then the library, we certainly don't need to generate the SMTP server.
I am not sure if this is always true. Even in our tests we may generate objects in the assumption that the underlying object is created too, be it on level 1 or deeper. If the object is optional, I would assume that I can set the FK to NULL and not create that object on the next level. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31142 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |INVALID --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Yes, most of our 1-N are NOT NULL anyway. The DB changes could be retrieved however (FK NOT NULL should not have a DEFAULT) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org