Ok, I think I have it figured out... It was all logical coding that gives me my solution. Please, correct me if there's a better way.
for(i=1;i lte
ArrayLen(arguments.caseChargeCollection);i=i+1) {
charge = r.getchargeiterator().add();
charge ._setTo(arguments.caseChargeCollection[i][1]);
charge.getdispositioniterator().add()._setTo(arguments.caseChargeCollection[i][ 2]);
charge.getsentenceiterator().add()._setTo(arguments.caseChargeCollection[i][3]);
}
charge = r.getchargeiterator().add();
charge ._setTo(arguments.caseChargeCollection[i][1]);
charge.getdispositioniterator().add()._setTo(arguments.caseChargeCollection[i][ 2]);
charge.getsentenceiterator().add()._setTo(arguments.caseChargeCollection[i][3]);
}
Thanks!
- Doug
On 7/18/06, Doug Arthur <[EMAIL PROTECTED]> wrote:
Hi, I'm having trouble digging down into my tables from reactor.Here's my table model in it's proper hierarchy:detaildetail_id - PKchargechage_id - PKdetail_idsentencesentence_id - PKcharge_iddispositiondisposition_id - PKcharge_idThere can be many charges to a single detail record. There can be many sentences to a single charge record. There can be many dispositions to a single charge record. The sentence/disposition tables do not relate up to detail, but rather through charge table they do.Now, my problem is that I can do createRecord('detail').getchargeiterator(), but how do i go further and get sentenceiterator()??????Here's my config of the objects<object name="detail">
<hasMany name="charge">
<relate from="detail_id" to="detail_id" />
</hasMany>
</object>
<object name="charge">
<hasMany name="disposition">
<relate from="charge_id" to="charge_id" />
</hasMany>
<hasMany name="sentence">
<relate from="charge_id" to="charge_id" />
</hasMany>
<hasOne name="detail">
<relate from="detail_id" to="detail_id" />
</hasOne>
</object>
<object name="disposition">
<hasOne name="charge">
<relate from="charge_id" to="charge_id" />
</hasOne>
</object>
<object name="sentence">
<hasOne name="charge">
<relate from="charge_id" to="charge_id" />
</hasOne>
</object>
Thanks!- Doug
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
