Announcement Announcement Module
Collapse
No announcement yet.
Using mapping declaration or named query? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using mapping declaration or named query?

    I need to do the follow query, I guess I can use mapping declaration or named query. Which way is better off? Is there performance difference?

    SELECT pn.PART_NUMBER,pi.PRICE,prog.NAME,ptype.DESCRIPTIO N,pi.X_UNIT_OF_MEASUREMENT,pi.X_DIRECTION,pi.X_TIE R_FROM_QTY
    FROM table_part_num pn,
    table_mod_level ml,
    table_price_qty pqt,
    table_price_inst pi,
    table_price_prog prog,
    table_price_type ptype
    WHERE
    ml.PART_INFO2PART_NUM=pn.OBJID
    AND ml.OBJID = pqt.CONTEXT_PART2MOD_LEVEL
    AND pqt.P_QTY_TYPE=0
    AND pi.PRICE_INST2PRICE_QTY = pqt.OBJID
    AND pi.PRICE_INST2PRICE_PROG = prog.OBJID
    AND pi.PRICE_INST2PRICE_TYPE = ptype.OBJID
    AND pn.PART_NUMBER = 'xyz'

  • #2
    Named query in what technology? It looks like you're using JDBC, in which case Spring doesn't externalize SQL by default.

    Comment

    Working...
    X