Closed jamesavilla closed 5 years ago
Global search not searching against join table when searching on user entity when its onetomany. The field is below...
In the user_bp table I have a field bpcName that I would like the global search to search on also.
@JsonView(DataTablesOutput.View.class) @OneToMany(cascade = {CascadeType.ALL}, orphanRemoval=true, fetch = FetchType.EAGER) @JoinColumn(name = "user_id",nullable=false) @OrderBy("bpcName ASC") public Set<UserBP> userBp;
My datatables js is as follows for this field which displays correctly but does not search on bpcName...
{ data: 'userBp.bpcName', render: function(data, type, row) { console.log(row['userBp'][0]); return row['userBp'] ? row['userBp'].map(function (userBp) { return userBp.bpcName; }).join('<br>') : ''; }, width: '200px' },
Global search not searching against join table when searching on user entity when its onetomany. The field is below...
In the user_bp table I have a field bpcName that I would like the global search to search on also.
@JsonView(DataTablesOutput.View.class) @OneToMany(cascade = {CascadeType.ALL}, orphanRemoval=true, fetch = FetchType.EAGER) @JoinColumn(name = "user_id",nullable=false) @OrderBy("bpcName ASC") public Set<UserBP> userBp;
My datatables js is as follows for this field which displays correctly but does not search on bpcName...
{ data: 'userBp.bpcName', render: function(data, type, row) { console.log(row['userBp'][0]); return row['userBp'] ? row['userBp'].map(function (userBp) { return userBp.bpcName; }).join('<br>') : ''; }, width: '200px' },