Hi,
I've been using LLBL for a while now and i've noticed a very weird (possible bug) with the way referencing and derefrencing happens.
Typical scenario of an order and order items.
I first load an item:
Dim oItem as new ItemEntity(1)
I have a sub that all it does is load the order items in a member variable:
private sub foobar(byval poOrder as OrderEntity)
Dim oPred As New PredicateExpression
oPred.AddWithAnd(PredicateFactory.CompareValue(ItemFieldIndex.IsCurrent, ComparisonOperator.Equal, True))
oPred.AddWithAnd(PredicateFactory.CompareValue(ItemFieldIndex.Deleted, ComparisonOperator.Equal, False))
m_cOrderItems = oOrder.GetMultiItem(True, oPred)
end sub
I then pass the related order to foobar to do some processing:
foobar(oItem.Order)
guess what order oItem now references ? ... nothing ! it is derefrenced !
fair enough if it was moved to another collection maybe , or maybe if it was byref , but it wasnt. Also the scope is different.
id like to know what the rules are for when an object is derefrenced from another and why? am i missing something major in my logic ?
is it a bug ?
Thanks in advance,
Tariq
(PS. is there a document specifying the internal rules such as these- that ofcourse if its nto a bug )