Have you tried creating a new KitQuantity and verifying that the to many relationships are non-null and instances of NSMutableArray?


KitQuantity actually doesn't have any to-many relationships, just 2 to-one relationships (to CatalogItem and InventoryItem). However, I did print out the class of every to-many relationship of CatalogItem (both a new one and one that existed already) and they were always of type com.webobjects.eocontrol._EOCheapCopyMutableArray, so at least that problem isn't still haunting me/begging for a cheap workaround. It could very well have been the case that when I was having those problems, I was initializing something in a constructor somewhere or some other EOF Commandment violation. I only became aware of the EOF commandments a few months back, and I've been trying to revise all my code to conform to them. That is what has led me to all of this, but I have faith I will be better off in the end for it.

It might be worth trying to sub-class EOGenericRecord to see if it makes any difference. I am not aware of any problems related to ERXGenericRecord, but it is a good test to make anyway.

I started to roll this back to EOGenericRecord, but I've been leaning pretty heavily on some of ERXGenericRecord's methods (like primaryKey () and rawPrimaryKey()), and at this point it would probably take me an hour or two to switch everything out, recompile, and recheck. I'll put this on the "last resort" list for now and come back to it.


No, that is normal.

Try adding this to KitQuantity and create a new one:
public EOClassDescription classDescription()
{
        EOClassDescription description = super.classDescription();
        NSLog.out.appendln("KitQuantity classDescription: " + description);
        return description;
}



The output is below. It all looks correct. Just for the heck of it, I added this to CatalogItem and InventoryItem as well.

KitQuantity classDescription: <class er.extensions.ERXEntityClassDescription (entity name: KitQuantity, attributes: ("quantity"), to-one relationships: ("catalogItem", "inventoryItem"), to-many relationships:())>

CatalogItem classDescription: <class er.extensions.ERXEntityClassDescription (entity name: CatalogItem, attributes: ("electronicDelivery", "keyDetailObject", "searchSummary", "isAvailable", "weight", "volume", "sku", "itemDescription", "msrp", "expirationDate", "storefrontVisibility", "visibleReviewCount", "creationDate", "manufacturer", "futureRelease", "releaseDate", "detailClass", "isTaxed", "oversize", "name", "descriptionSummary", "totalSold", "featuredItemPriority", "price", "shippingCost", "salesStatus"), to-one relationships: ("hugeMedia", "smallMedia", "sale", "organization", "largeMedia", "vendor", "store", "inventoryItem"), to-many relationships: ("kitQuantities", "categories", "orders", "relatedToCatalogItems", "reviews", "upSaleItems", "kitGroupItemSpecifications", "freebies", "relatedCatalogItems", "sideSaleItems"))>

InventoryItem classDescription: <class er.extensions.ERXEntityClassDescription (entity name: InventoryItem, attributes: ("minimumOrderQuantity", "availableQuantity", "lastWholesalePrice", "shelfQuantity", "isDropShipped", "quantityPendingArrival", "wholesaleCost", "discontinued", "skuFromSupplier", "bin2", "minimumAvailableQuantity", "expectedReorderArrivalDate", "numberSold", "bin1"), to-one relationships: ("supplier", "organization"), to-many relationships: ("catalogItems", "itemsOrderedNotReceived", "kitQuantities", "customersToNotifyWhenInventoryArrives"))>




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to