Hi Bill
if I am forced to utilize a bank of stored procedures to create every data property of my business object.
No need to do this - the proc can return whatever you want. I my example the StationType was just part of the WHERE clause but the value being checked was in an associated table not the PUN table itself.
In our PUN table for example we have quite a number of custom fields:
Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()
Dim boPUNType As System.Type = Me.GetType()
Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"OperatorName", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"INIDescription", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"INIMaxHides", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"INIMaxWeight", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"INIMaxArea", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"PKBCode", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"ReceiveBatchCode", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"FlesherBatchCode", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"ShortTermBatchCode", boPUNType), _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"TanningBatchCode", boPUNType)}
End Function
#End Region
Our stored procedures return these values as needed. If we need to add more custom fields we can without breaking any existing code.
Regarding the other question - correct it wouldn't actually delete the rows until you did a BO.Save so you would want to carefull.
The best approach is not to return the data at all.
Cheers, Peter