Details des Tickets

Beschreibung,Kommentare und Anhänge

merge request id 864
TitelFeature/ll 1598 optimize relation code
Beschreibungviele kleine Optimierungen am Code, die den Code besser lesbar, wartbarer und performanter machen
Statusmerged
Created at 2023-07-31T14:57:28.334Z
Updated at 2023-08-21T13:57:49.962Z
Source branchfeature/LL-1598-optimize-relation-code
Target branchdevelop
AuthorGregor Gabriel
AssigneeSascha Immig

Discussion notes

added 1 commit
  • 2da15c1f - provided HasOneThrough relation resource() for TrainingItem and Session model,…
Compare with previous version
Gregor Gabriel 2023-08-01T06:53:25.822Z
merged Sascha Immig 2023-08-21T13:57:50.013Z

Merge Commits

Title Id Author Created at Message
+ where senseful, replaced ->count() by ->exists() 1d0afd5bf62df18e858fc74626389337af0ab399 TUV\gabrielg 2023-07-31T11:35:40.000Z + where senseful, replaced ->count() by ->exists() + added Content::sessions() relation and fixed function Content::hasSessions()
provided HasOneThrough relation resource() for TrainingItem and Session model,… 2da15c1fb8a2fd5200805e205e76e52437547c7d TUV\gabrielg 2023-08-01T06:53:15.000Z provided HasOneThrough relation resource() for TrainingItem and Session model, so we have sample code for this relations in all directions
in some trivial case use ->whereIn($field, $queryBuilder->select('id')) instead… 6795d5af3be7f8914ec52aa9024737432684a96d TUV\gabrielg 2023-07-31T14:56:02.000Z in some trivial case use ->whereIn($field, $queryBuilder->select('id')) instead of ->whereIn($field, $queryBuilder->pluck('id')) this saves one query and is much more performant if pluck would deliver much data
reworked some quieries that used join() method in Group and OrganizationUnit models a3c57207a958d7562188363388001470b9ac1a6f TUV\gabrielg 2023-07-31T14:01:29.000Z reworked some quieries that used join() method in Group and OrganizationUnit models
+ reworked queries to get trainings from content b2cbeb87b7769244b5098007a10c7e260698cc45 TUV\gabrielg 2023-07-31T12:46:41.000Z + reworked queries to get trainings from content + removed unused function