Thanks, I may give it a try.

Werner Guttmann-6 wrote:
> 
> Okay, I think that's enough context for me to suggest a few things.
> 
> Top of my head, I think a good starting point should be to analyze the
> createClassDescriptor() method of the XMLMappingLoader class to see
> where additional log statements could be inserted.
> 
> In particular, have a look at line 182ff and 292f where the
> auto-complete attribute of a ClassMapping instance is being considered
> to decide how to go about descriptor creation (from a mapping, ...).
> 
> I am more than willing to help you with any problems related to
> understand the code base.
> 
> Regards
> Werner
> 
> jimmi4664 wrote:
>> I have a working mapping right now. Mapping of some classes and
>> attributes is
>> defined manually in the mapping xml file. Some parts of the mapping are
>> auto-completed by castor. It all works perfectly.
>> 
>> Now I want to define the parts castor auto-completes manually. This is
>> because I would like to define each persisted class and it's attributes
>> explicitly. I use castor mapping to basically create a "save file" of
>> some
>> of my classes. By defining all the mapping manually, I can 1) document
>> which
>> fields are stored in the savefile, and how and 2) protect against old
>> savefiles getting broken when when I for example refactor the name of one
>> attribute.
>> 
>> Recreating the auto-completed is a bit time consuming and error prone.
>> Some
>> eg. collection mappings that work when castor auto-completes the mapping,
>> seem to be a bit difficult to create by hand and figuring out where
>> (un)marshalling failed takes time. That's why it would have been nice to
>> see
>> which kind of mapping castor automatically created and copy from that.
>>  
>> 
>> 
>> Werner Guttmann-6 wrote:
>>> Hi,
>>>
>>> I don't think the current code base has support for this feature. Whilst
>>> it could be added in theory, one has to keep in mind that a mapping file
>>> is just one way of defining a binding between your Java classes and the
>>> corresponding XML documents.
>>>
>>> Internally, Castor XML (as well as JDO) uses descriptor classes to
>>> establish exactly that binding information, And afair there's some
>>> debugging output related to establishing what descriptor(s) is being
>>> used during unmarshalling.
>>>
>>> So how about defining what you are looking for once again - keeping in
>>> mind what I have just said.
>>>
>>> Cheers
>>> Werner
>>>
>>> jimmi4664 wrote:
>>>> I define my XML mapping in a mapping file castor-mapping.xml. Some
>>>> classes
>>>> use Castor's automatically created mapping with auto-complete="true"
>>>> for
>>>> some or all fields, and some classes are fully configured in the file
>>>> with
>>>> <class name="foo" auto-complete="false"/>
>>>>
>>>> I want to change all classes to have auto-complete="false", so that I
>>>> don't
>>>> run into problems if I rename some fields and can better control what
>>>> fields
>>>> are mapped and what not. 
>>>>
>>>> Can I get Castor to print out the actual mapping it generates based on
>>>> the
>>>> given mapping file? I have activated debug logging but that info does
>>>> not
>>>> seem to be logged.
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> 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
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-display-actual-used-mapping--tp26575308p26604927.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to