lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noble Paul നോബിള്‍ नोब्ळ् <noble.p...@corp.aol.com>
Subject Re: Question about DIH execution order
Date Mon, 02 Nov 2009 05:14:27 GMT
On Sun, Nov 1, 2009 at 11:59 PM, Bertie Shen <bertie.shen@gmail.com> wrote:
> Hi folks,
>
>  I have the following data-config.xml. Is there a way to
> let transformation take place after executing SQL "select comment from
> Rating where Rating.CourseId = ${Course.CourseId}"?  In MySQL database,
> column CourseId in table Course is integer 1, 2, etc;
> template transformation will make them like Course:1, Course:2; column
> CourseId in table Rating is also integer 1, 2, etc.
>
>  If transformation happens before executing "select comment from Rating
> where Rating.CourseId = ${Course.CourseId}", then there will no match for
> the SQL statement execution.
>
>  <document>
>     <entity name="Course" transformer="TemplateTransformer" query="select *
> from Course">
>      <field
> column="CourseId" template="Course:${Course.CourseId}" name="id"/>
>      <entity name="Rating" query="select comment from Rating where
> Rating.CourseId = ${Course.CourseId}">
>        <field column="comment" name="review"/>
>      </entity>
>    </entity>
>  </document>
>

keep the field as follows
  <field
column="TmpCourseId" name="CourseId"
template="Course:${Course.CourseId}" name="id"/>




-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Mime
View raw message