Mailing List webobjects-dev@wocommunity.org Message #114
จาก: Ricardo Parada <webobjects-dev@wocommunity.org>
หัวเรื่อง: ERXCopyable.CopyType = Nullify on to-many relationship should empty instead
วันที่: Thu, 25 Mar 2021 13:01:48 -0400
ถึง: <webobjects-dev@wocommunity.org>
Hello everyone,

I like that in Wonder when you create an EO all the to-many relationships are initialized to an empty array because it means that I don’t have to worry about null checking every time I access the to-many relationship in order to avoid NullPointerExceptions. 

However, if I create my EO by copying an existing one using ERXCopyable then any to-many relationships that have ERXCopyable.CopyType set to Nullify will be set to null. 

Wouldn’t it be better to set them to an empty array? Or should we have an Emptify option?

Thanks
Ricardo Parada
สมัครสมาชิก (ป้อนข้อมูล) สมัครสมาชิก (ไดเจสท์) สมัครสมาชิก (ดัชนี) ยกเลิกสมาชิก ส่งเมล์ถึงลิสต์มาสเตอร์