Skip to content

MorphMany failure #148

Open
Open
@jmverges

Description

@jmverges
  • Laravel version: 8.83.16
  • Laravel Soft Cascade Version: 8.1.0

Description:

I'm using a polymorphic

    public function files(): MorphMany
    {
        return $this->morphMany(File::class, 'files', 'fileable_type', 'fileable_id');
    }

but it seems not to work.

It says

Column not found: 1054 Unknown column 'entry.deleted_at' in 'field list' (SQL: update `files` set `entry`.`deleted_at` = 2024-05-03 14:31:15, `files`.`updated_at` = 2024-05-03 14:31:15 where `id` in (1998334, 1998335, 1998336, 1998337, 1998338, 1998339, 1998340, 1998341, 1998342, 1998343, 1998344, 1998345, 1998346, 1998347, 1998348, 1998349, 1998350, 1998351, 1998352, 1998353, 1998354, 1998355, 1998357, 1998358, 1998359, 1998360, 1998474, 1998475, 1998669, 1998670) limit 30)", message: "Internal server error", extensions: { category: "internal" }, locations: [[Object]], path: ["doEntry"], trace: [[Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], ... 75 more items] }

Entry is the model that includes the trait and Files is the model that needs to be deleted on cascade

I'm seeing this issues here and seems the same

#109
#31

Any help here?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions