Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB-QL with non-CM fields  RSS feed

 
Kris Philippaerts
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

is it possible to write an EJB-QL query that uses normal CMP entity beans, together with plain database fields (not wrapped with an e-bean).

With other words, I need to write a where clause that does something like this:

WHERE myBean.thingyFK.value = ?1

'myBean' is a normal entity bean and has a foreign key to a database table 'thingy'. From this table, I need the column 'value'. The table 'thingy' has no entity bean. (And it is not possible to introduce a new entity bean for this...)

Otherwise I'll have to use a fastlane or something, but at this point I rather want the EJB-QL solution.

Thanks a lot!
Kris
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBQL is writting for an abstract schema. You describe the schema in the ejb-jar.xml file. So only fields described in the ejb-jar.xml can be used in a ejb query.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!