The CompensationEntity inherits from the TransactionEntity class. In that base class, we specified the Profiteers as a list of Profiteers, since that's the wider case and it fits a Compensation and an Expense.
This leads to this imperfection however: (link below)
public ProfiteerEntity getProfiteer() {
return getProfiteers().get(0);
}
|
public ProfiteerEntity getProfiteer() { |
|
return getProfiteers().get(0); |
|
} |
|
|
It would be nice to move the ProfiteerEntity from the base classes to the concrete classes. We can have a list of ProfiteerEntitites in Expenses and a single ProfiteerEntity in Compensations.
@McDonnough has tried that but hasn't succeeded so far due to time constraints.
The
CompensationEntityinherits from theTransactionEntityclass. In that base class, we specified the Profiteers as a list of Profiteers, since that's the wider case and it fits a Compensation and an Expense.This leads to this imperfection however: (link below)
api.teiler.io/src/main/java/io/teiler/server/persistence/entities/CompensationEntity.java
Lines 46 to 49 in 26b61d8
It would be nice to move the ProfiteerEntity from the base classes to the concrete classes. We can have a list of ProfiteerEntitites in Expenses and a single ProfiteerEntity in Compensations.
@McDonnough has tried that but hasn't succeeded so far due to time constraints.