chore: remove BaseDomain on WorkspacePlugin (#30958)

The `WorkspacePlugin` is not a top-level entity. Yet, it extends
`BaseDomain`. It gets all the fields from `BaseDomain`, but since it
doesn't have a collection of its own, nothing is ever used.

This is fine today, with the `@Document` annotation, but with Postgres,
with `@Entity` annotation, querydsl is getting confused and is creating
a `QWorkspacePlugin` class, which is producing a compile error in
`QWorkspace.plugins` field.

This PR removes this unneeded inheritance.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
	- Updated the structure of the Workspace Plugin to enhance performance.
- **Bug Fixes**
- Ensured all plugins, including previously inaccessible ones, are now
correctly retrievable.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Shrikant Sharat Kandula 2024-02-07 15:43:26 +05:30 committed by GitHub
parent 39b7d4bb66
commit df6dce26e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -1,6 +1,5 @@
package com.appsmith.server.domains;
import com.appsmith.external.models.BaseDomain;
import com.appsmith.server.dtos.WorkspacePluginStatus;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
@ -15,7 +14,7 @@ import lombok.ToString;
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class WorkspacePlugin extends BaseDomain {
public class WorkspacePlugin {
String pluginId;

View File

@ -134,7 +134,6 @@ public class PluginServiceCEImpl extends BaseService<PluginRepository, Plugin, S
}
List<String> pluginIds = org.getPlugins().stream()
.filter(plugin -> !plugin.isDeleted())
.map(WorkspacePlugin::getPluginId)
.collect(Collectors.toList());
Query query = new Query();