ฉันมีโครงสร้างดังต่อไปนี้:
โครงสร้าง ก:
<itemlist>
<item>
<id>123</id>
<price>1</price>
<quantity>1</quantity>
</item>
<item>
<id>124</id>
<price>2</price>
<quantity>1</quantity>
</item>
<item>
<id>125</id>
<price>3</price>
<quantity>1</quantity>
</item>
<itemlist>
โครงสร้าง ข:
<totals>
<total>
<totalPrice>3</totalPrice>
</total>
</totals>
หากฉันต้องการให้ผลรวมของฟิลด์ทั้งหมดคูณด้วยฟิลด์ในโครงสร้าง A ลงในฟิลด์ราคารวมของโครงสร้าง B จะเป็นไปได้ใน DataMapper หรือไม่
ถ้าเป็นไปได้คุณจะทำอย่างไร?
ขอบคุณ