On Feb 23, 2010, at 9:06 AM, David LeBer wrote:
On 2010-02-23, at 11:55 AM, Jon Nolan wrote:

Is this sane and safe?

 public Properties properties() {
     Properties properties = super.properties();
     if (properties == null) {
         properties = Properties.createProperties(editingContext());
         setPropertiesRelationship(properties);
     }
     return properties;
 }

Seems to work fine and suits my needs perfectly but it makes me uneasy.

Trust in your instincts, because they don't tell lies.


Thanks,
Jon

Seriously smacks of EOF commandment violations to me:

<http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-The+EOF+Commandments >

See: #6, #8.

I'd use awakeFromInsertion or create a cover accessor (lazyProperties(), setLazyProperties()),

+ 1


and in a purely naming convention vein, try to avoid having Entities with plural names, it makes it too easy to confuse them with relationships.

+ 10



;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:        http://www.linkedin.com/in/davidleber
twitter:        http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to [email protected]

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
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