Hi
Toby wrote:
> Sure, I'll have a go.
Thanks in advance ....
> I'll try and do a test case that demonstrates it. Not
> sure if I'm trying to do really weird stuff with Castor, ...
No, you are not .. ;-).
> so I'll try and
> simplify in a test case and see what's what ...
Especially that simplifications would be appreciated (as it'd ease my job).
>
> BTW, what's the general procedure for JIRA issues, do you discuss things
> here before posting a bug? I had another issue with collections of
> collections ... ;)
Discuss things here first ... and yes, I have seen your other email, but
my day job(s) sometimes prevent me from answering such 'big' questions
immediately.
>
> Cheers
>
> 2008/5/6 Werner Guttmann <[EMAIL PROTECTED]>:
>
>> NIce. Though I shall mention that this should work with the transient
>> attribute placed on the <bind-xml> element as well .. ;-(. Can you
>> please create a Jira issue and attach all relevant information ?
>>
>> Werner
>>
>> Toby wrote:
>>> Awesome!
>>>
>>> b) did the trick :)
>>>
>>> Thanks a lot.
>>>
>>> 2008/5/5 Werner Guttmann <[EMAIL PROTECTED]>:
>>>
>>>> Hmm, there's two options in my view:
>>>>
>>>> a) switch away from using auto-complete, and enlist all required
>>>> properties manually.
>>>>
>>>> b) Try the transient attribute on the <field> mapping, i.e.
>>>>
>>>> <class name="com.foo.User" auto-complete="true">
>>>> <field name="allRaces" transient="true" />
>>>> </class>
>>>>
>>>> Werner
>>>> Toby wrote:
>>>>> Hi,
>>>>>
>>>>> Well, my (noob) mapping files looks like this;
>>>>>
>>>>> <class name="com.foo.User" auto-complete="true">
>>>>> <field name="allRaces">
>>>>> <bind-xml transient="true" />
>>>>> </field>
>>>>> </class>
>>>>>
>>>>> I was thinking that the auto-complete part would just figure out the
>>>> rest of
>>>>> the fields using introspection and I am just trying to exclude
>>>> "allRaces"
>>>>> which is just a method in this case (there is no field allRaces).
>>>>>
>>>>> Bit of a newbie so any pointers much appreciated :)
>>>>> Cheers
>>>>>
>>>>> 2008/5/4 Werner Guttmann <[EMAIL PROTECTED]>:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> what does your mapping look like for this field in particular ?
>>>>>>
>>>>>> Werner
>>>>>>
>>>>>> diyfiesta wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I have two getters which return data from the same field but in
>>>> slightly
>>>>>>> different ways, for example,
>>>>>>>
>>>>>>> private List<String> list;
>>>>>>>
>>>>>>> with
>>>>>>>
>>>>>>> List<String> getStringsInReverse() {
>>>>>>> }
>>>>>>> List<String> getStrings() {
>>>>>>> }
>>>>>>>
>>>>>>> I want to marhsall only one of these. Castor seems to be using the
>>>>>> getters
>>>>>>> (the field is actually private), so I'll get both the list of
>> strings
>>>>>> and
>>>>>>> the list of strings in reverse in the XML. Can can I prevent one of
>>>>>> these
>>>>>>> getters being used, so it'll marshall only the strings to XML?
>>>>>>>
>>>>>>> I've tried, <bind-xml transient="true" /> but becuase this is for a
>>>>>>> field(?), it gives the following error;
>>>>>>>
>>>>>>>
>>>>>>> Caused by: java.lang.IllegalArgumentException: list is not a valid
>>>>>>> FieldMappingCollectionType
>>>>>>> at
>>>>>>>
>> org.exolab.castor.mapping.xml.types.FieldMappingCollectionType.valueOf(FieldMappingCollectionType.java:254)
>>>>>>> at
>>>>>>>
>> org.exolab.castor.xml.XMLMappingLoader.createFieldDesc(XMLMappingLoader.java:629)
>>>>>>> at
>>>>>>>
>> org.exolab.castor.mapping.loader.AbstractMappingLoader.createFieldDescriptors(AbstractMappingLoader.java:415)
>>>>>>> at
>>>>>>>
>> org.exolab.castor.xml.XMLMappingLoader.createClassDescriptor(XMLMappingLoader.java:237)
>>>>>>> at
>>>>>>>
>> org.exolab.castor.mapping.loader.AbstractMappingLoader.createClassDescriptors(AbstractMappingLoader.java:262)
>>>>>>> at
>>>>>>>
>> org.exolab.castor.xml.XMLMappingLoader.loadMapping(XMLMappingLoader.java:156)
>>>>>>> at
>>>>>>>
>> org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:162)
>>>>>>> at
>>>>>>>
>> org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:128)
>>>>>>> at
>>>>>> org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:556)
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>> http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>> http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email