title: How to map native query to one model class?
body: <p>Hi I´m using Eclipselink and I did a native query to select some fields of 2 tables. I mapped my table Logins in a model class. I would not like to map my table "B" because I need only 2 fields of this table on my sql result.. can I map this 2 fields in my Logins table to my sql result ?</p>
  
  <p>My sql is this:</p>
  
  <pre><code>select l.login_id, s.lugarcerto,s.vrum, l.username, l.first_name, l.last_name, l.phone, l.fax_number, l.address, l.zip, 
            l.address2 as 'birth_date', l.city as 'cpf_cnpj'
  from Logins l
  join (select se.login_id, lugarcerto = min(case when se.service = 'IM' then '1' end), vrum = min(case when se.service = 'VE' then '1' end)
          from (select distinct ad.login_id, substring(ap.Rate_code,(CHARINDEX('-', ap.Rate_code)+1),2) as 'service'
                  from Ad_Data.dbo.ad ad
                  join Ad_Data.dbo.ad_pub ap on (ad.ad_id = ap.ad_id)
                 where ap.ad_type =1) se
         group by se.login_id) s on (s.login_id = l.login_id)</code></pre>
  
  <p>I did map Logins table and I want to map s.lugarcerto and s.vrum to my SQL query result.
  There´s anyway to just add it to my Logins model ?</p>