[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [JBoss-user] [Persistence & CMP/JBoss] - Re: Mapping Entity Beans to Database Tables
From:       ironbird <nukes () jboss ! org>
Date:       2004-05-31 21:37:51
Message-ID: 10312937.1086039471881.JavaMail.roy () zeus
[Download RAW message or body]

anonymous wrote : 
  | I think maybe all the words didn't come through. I am unclear on what exactly you \
suggest removing.   | 
You don't need to define the findByPrimarykey finder. The container knows how to \
implement it.

anonymous wrote : 
  | I think this might be a slip in terminology. It appears to be either a PostgresQL \
message or a java message i.e. 	  | 
  | BTW, when I create a view called "question" which is simply a "SELECT * FROM \
Questions" the table is mapped but then I get field mapping errors (makes sense if it \
is the same mapping pattern problem)   | 

The only term in your code where "question" is referenced is your entity bean name \
(and it has nothing to do with an SQL string) and your table name "Question \
Categories" (which has to do with sql string). The error log talks about a relation \
but there is no relation in your descriptor snippets. So the error text is useless.

anonymous wrote : 
  | I don't think this is the problem. PostgresQL seems to be case sensitive and \
translates everything you type in a sql statement to lowercase unless you put it in \
quotes. Same goes for spaces. So in PostgresQL,   | SELECT * FROM "Question \
Categories" works fine.   | 
I agree with you for the database, but when I try myself on my computer, the \
container don't put the quotes and throws an error.

anonymous wrote : 
  | Do you mean QuestionCategoryBean (upper case B)? 
  | 
No, the EJB spec from SUN says that the where clause in EJB-QL must refers to the \
abstract schema name of your bean, which is QuestionCategory, not \
QuestionCategoryBean. So your EJB-QL should be

  | SELECT OBJECT(qcb) FROM QuestionCategory qcb WHERE qcb.id = ?1
  | 

You think that the error is for your questions bean. I think the error is for your \
QuestionCategory bean. Try to activate cmp plugin traces to see the generated SQL in \
jboss log file. Add 

  | <category name="org.jboss.ejb.plugins">
  |     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
  | </category>
  | 
in Log4j.xml


View the original post : \
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837004#3837004

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837004




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic