Quantcast

GORM List Dropping Duplicates

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

GORM List Dropping Duplicates

dcwmark
Team Grails Forum,

I have in one of my Controllers a very standard piece of code for list with pagination.

Controller Class:
    def fsList = {
        params.max = params.max ? params.int('max') : LINES_PER_PAGE
        [lmsMonthlyLoad: lmsMonthlyLoadService.fsList(params),
         lmsMonthlyCount: lmsMonthlyLoadService.count()]
    }

Service Class:
    def fsList = { params ->
        LmsMonthlyLoad.list(params)
    }
   

In my LmsMonthlyLoad data table, I have duplicate records.  The "count" is providing the actually record count "correctly" *BUT* the list is returning all but the duplicated record.

May I know what I need to do to ask GORM *not* to filter out the duplicate record when returning the list?


Cordially,
Entaro Adun.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: GORM List Dropping Duplicates

dcwmark
Team Grails Forum,

Please, ignore this question.  It seems that my data provider for my legacy domain mapping class, "deliberately" inserted duplicated rows in a table.  As I have provided "id generator" in the domain mapping, the actual SQL Server table does not have a unique constraint.  I believe GORM was having trouble handling this inconsistency and simply "ignore" the duplicated rows for the list() operation.


Cordially,
Entaro Adun.
Loading...