glorp icon indicating copy to clipboard operation
glorp copied to clipboard

ObjectBuilder should raise exception when the descriptor primary key dosen't match the incoming query result stream

Open mahugnon opened this issue 4 years ago • 0 comments

When the Glorp ObjectBuilder find that the descriptor primary key provided by the user doesn't match with the incoming query result stream primary key, it returns an empty array even if the SQL query result stream is not empty. This can be easily verified by sending manually the query. I think this can be contrary and problematic because the user doesn't know that there's is a mistake in his mapping at the end and so for him, the database is empty which is not true. This can take a quite amount of time to realize what is going on. To avoid that I suggest that the ObjectBuilder raise an exception or a warning, in this case, to make the user aware of the issue in his mapping.

mahugnon avatar Aug 18 '20 10:08 mahugnon