Hi,
How to restrict the soft deleted values ?
If I soft delete the row from parent or child then I need to restrict to load the parent with child row(Soft deleted row) in the parent browser as well as in child
Hi,
How to restrict the soft deleted values ?
If I soft delete the row from parent or child then I need to restrict to load the parent with child row(Soft deleted row) in the parent browser as well as in child
Hi Mallik,
What do you mean by “restrict to load”?
public class Parent extends StandardEntity {
@OnDelete(DeletePolicy.CASCADE)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "CHILD_ID")
protected Child child;
...
}
<groupDatasource id="parentsDs"
class="com.company.sample.entity.Parent"
view="_local">
<query>
<![CDATA[select e from sample$Parent e where e.child is not null]]>
</query>
</groupDatasource>
Hi Olga,
I am using the below code
LoadContext<Data_Measure_Map> loadContext = LoadContext.create(Data_Measure_Map.class)
.setQuery(LoadContext.createQuery(“select e from keansacloud$Data_Measure_Map e where e.child is not null and e.plan_data_column=:column”)
.setParameter(“column”,val))
.setView(“data_Measure_Map-with-DMMEASURE-BUCKET”);
Here Data_Measure_Map is the parent and bucket is the child. Some of the rows are deleted from child table.
I need to restrict the soft deleted results while loading the results from parent and child with join
Unfortunately, I don’t understand what you are trying to implement.
Your code provides the same result as the datasource query above: it omits the parents with null children. Could you clarify where is the problem?