I think you'll find that the problem is coming from the addOrderAttribute line. At the moment you are only able to order by properties in the first class (ie ScarabActivity). It's a known problem and an RFE already exists to add this feature.
- Richard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to write something. The code I have so far is:
Dim SA As Scarab.ScarabActivity
SA = New Scarab.ScarabActivity
Dim ST As Scarab.ScarabTransaction
ST = New Scarab.ScarabTransaction
Dim rc As CRetrieveCriteria
rc = New CRetrieveCriteria
Dim sql As CSqlStatement
sql = New CSqlStatement
Dim Cond, Cond1 As CCriteriaCondition
Cond = New CCriteriaCondition(ST.getClassMap)
Cond.addSelectBetween("CreatedDate_", New Date(2004, 9, 1), New Date(2004, 10, 1))
Cond1 = New CCriteriaCondition(SA.getClassMap)
Cond1.addSelectEqualTo("AttributeId_", 3)
Cond.addSubCriteria(Cond1, False)
rc.ClassName = "ScarabActivity"
rc.ReturnFullObjects = True
rc.ClassMap = SA.getClassMap
rc.WhereCondition = Cond
rc.addOrderAttribute("ScarabTransaction.CreatedDate_")
What happens is that the map for class ScarabTransaction cannot be found.
Suggestions would be appreciated.
Thanks in advance,
Jacques
Hi Jaques,
I think you'll find that the problem is coming from the addOrderAttribute line. At the moment you are only able to order by properties in the first class (ie ScarabActivity). It's a known problem and an RFE already exists to add this feature.
- Richard.