I have two database queries which return the same structure, and I need to combine them. The queries themselves are derived from completely different data sets, so I can’t combine them directly from the database.
I tried a simple “set1 + set2”, and initially that looked like it worked, but it seems to result in the wrong result. With this, if set1 contains 2 objects, and set2 5 objects, I get the last 3 objects added to set1.
Ideally what I need is to combine them, and remove any duplicates. Each object in this set contains a set of user data (username, firstname, lastname).
Any thoughts would be welcome - I’m sure this should be simple, but I can’t see a way to do it…