What you're suggesting is similar to having a dynamic subclass, so theoretically it could work. However, I don't know if it's working today. It depends on if the generated get method will delegate to the base in this case, and the base class will handle it properly. I suggest you try using SDOUtil.createProperty (see my other reply) to create the extra property and then give this a try to see what happens.
Frank Ron Gavlin <[EMAIL PROTECTED]> 07/25/2007 05:08 PM Please respond to [email protected] To [email protected] cc Subject Re: How to add Property to an XSDHelper-defined Type Thanks. Another question. What happens if the type has a corresponding code-generated class based on the original schema and then I add a new property to that type? Obviously, I would need to use the dynamic apis to work with the new property. However, will the code-generated class still behave normally or will the new property break it? - Ron ----- Original Message ---- From: Frank Budinsky <[EMAIL PROTECTED]> To: [email protected] Sent: Wednesday, July 25, 2007 4:37:46 PM Subject: Re: How to add Property to an XSDHelper-defined Type If you create your HelperContext using SDOUtil.createHelperContext(true), XSDHelper.define() will then let you add new types to an existing namespace and also to replace an existing type with a new version (Note: this is a "use at your own risk" feature). So, you could add a new property by calling XSDHelper.define() again passing in a new version of the XSD type that includes the new element/attribute. Maybe we should consider makingTypeHelper.define() also allow you to modify existing types if the HelperContext has extensibleNamespaces == true? Frank. Ron Gavlin <[EMAIL PROTECTED]> 07/25/2007 03:55 PM Please respond to [email protected] To tuscany-user tuscany-user <[email protected]> cc Subject How to add Property to an XSDHelper-defined Type Greetings, I have a Type that was created using XSDHelper.define(). Now I would like to dynamically add an add'l Property to this Type. This does not appear to be supported. Can you suggest any workarounds? - Ron --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
