我試圖編寫一個HQL查詢來選擇包含子集合中的對象的對象。 例子: 競賽對象 ContestID
ContestName
RequiredCountries -> one to many collection of Country objects
Country對象 CountryCode
CountryName
的SQL相當於我想要什麼: SELECT * FROM CONTEST
我必須設置爲一個具有兩個屬性,X和Y 關鍵我有一些類似的自定義類: Dim test As New List(of TestClass)
Dim key as New TestData
key._a = A
key._b = B
For Each a As TestClass In SomeCollection
If Not test.Contains(key) Then