You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Dougall Squair <Do...@metcash.com> on 2003/06/16 06:05:46 UTC

Report query and field conversion

Hi, 

I have defined a ReportQueryByCriteria which has as a field that uses a
conversion class. e.g.  

	....

    <field-descriptor
        name="addressStatus"
        column="status"
        jdbc-type="INTEGER"
        conversion="dao.ojb.Status2IntFieldConversion"
    >


However the data type of the object returned in the row array is of Type
java.lang.Integer and not Status.  Is this expected behavour?

Dougall

Re: Report query and field conversion

Posted by Thomas Mahler <th...@web.de>.
Hi Dougall,

ReportQueries don't care for FieldConversions!
ReportQueries give you the freedom to perform queries that have nothing 
in common with the object model defined in repository.xml.

They also do not return business objects but row arrays.
So it would not correct to apply FieldConversions, as they are only 
defined for business objects.

cheers,
Thomas

Dougall Squair wrote:
> Hi, 
> 
> I have defined a ReportQueryByCriteria which has as a field that uses a
> conversion class. e.g.  
> 
> 	....
> 
>     <field-descriptor
>         name="addressStatus"
>         column="status"
>         jdbc-type="INTEGER"
>         conversion="dao.ojb.Status2IntFieldConversion"
>     >
> 
> 
> However the data type of the object returned in the row array is of Type
> java.lang.Integer and not Status.  Is this expected behavour?
> 
> Dougall
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
>