Bug??? EOClassDescription.classForAttributeKey(String)
Bug??? EOClassDescription.classForAttributeKey(String)
- Subject: Bug??? EOClassDescription.classForAttributeKey(String)
- From: Florijan Stamenkovic <email@hidden>
- Date: Wed, 16 Jan 2008 16:52:51 -0400
Hi all,
Running WO 5.3, it seems that the client side of EOF has a bug (what
a surprise). The bug being:
EOClassDescription's classForAttributeKey(String key) method returns
null for a plain String attribute (name). Strangely the JavaDoc for
the method says nothing at all, I assume what it should do based on
it's name alone.
Questions to the community:
1. Can anyone confirm this please?
2. Is this client side only?
3. Is this present in WO 5.4?
4. Anyone has another workaround besides the one below?
Workaround (which will only work on the client side):
// your class description
EOClassDescription classDescription = ...
String className = ((EODistributedClassDescription)classDescription).
attributeNamed(key).valueClassName();
try{
return Class.forName(className);
}catch(ClassNotFoundException e){
return Object.class;
}
The above code returns String.class good and easy.
If this is confirmed this will be the second bug found in the client
side EOClassDescription (the first being the complete flop of the
validateForDelete(EOEnterpriseObject) method).
My best,
Flor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden