RelationPredicateBucket

Posts   
 
    
avo
User
Posts: 9
Joined: 06-Jan-2012
# Posted on: 03-Nov-2017 10:43:06   

I am using LLBLGen Pro Runtime Framework 5.0.6 (Adapter) with VB.Net Framework 4.0. I wanted to know if there is a way to check if two RelationPredicateBucket objects are identical?

Example: Dim predicate1 = New RelationPredicateBucket(TLndFields.TLnd_Cod = "LU") Dim predicate2 = New RelationPredicateBucket(TLndFields.TLnd_Cod = "LU")

    If Not Object.Equals(predicate1, predicate2) Then
        ' Todo: Fetch data
    End If

But Object.Equals always returns False.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 05-Nov-2017 09:05:54   

Object.Equals checks for whether they're the same object, they're not, they're two objects with perhaps the same contents.

Could you elaborate a bit why you want to do this? perhaps your use case is served better with another approach?

Frans Bouma | Lead developer LLBLGen Pro
avo
User
Posts: 9
Joined: 06-Jan-2012
# Posted on: 06-Nov-2017 12:36:04   

We have a generic piece of code that validates an input against a filter.
The result of this validation should be cached.
The filter has to be part of that cache.
So we need to be able to compare to filter so see whether they are equal.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 06-Nov-2017 21:53:13   

Please check the solutions suggested here: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=23136