Well, I have some news, but I don't know how thrilled I am with it.

First, without changing anything WRT my Question bean and descriptors, nor without 
redeploying, I added a view in my database called "question" which maps to "Questions" 
and maps the fields like category_id to categoryid.

The result...it worked.

But it seems like a hack.  I just spent half the day cursing about Microsoft and now 
this.  There has to be something else we can do, especially since legacy database 
schemas will not always conform.  And with PostgreSQL, quotes are needed to 
distinguish not only spaces but case, like "Questions" from "questions".

Not to mention, BTW, that you can only read from a view, which, of course, is a 
problem.

In response to loubyansky:

anonymous wrote : There is no bug wrt <abstract-schema-name>. The problem is the space 
in the table name. It should be quoted in queries but it's not. This can be considered 
as a bug in JBossCMP. While it's not fixed you have to use table names that can be 
used w/o quotes.

Could you please elaborate on distinguishing a bug with <abstract-schema-name> and 
JBossCMP?  Knowing what I do (which is only at the novice level) I don't see how we 
can make this distinction with the information at hand, i.e. it is all JBoss to me.

Note also that my test case with Question worked without doing anything to 
QuestionCategory or descriptors, so again I am suspect of this analysis.

But if it is a bug with the container, and it is not JBoss's responsibility to fix it, 
from who and where can I get another one?

In response to ironbird:

anonymous wrote : I don't understand you don't have a deployment error. With JBoss 
3.2.3, I have a deployment error "Error in jbosscmp-jdbc.xml : datasource-mapping not 
found" if I do the same thing. 
  | 

Perhaps it is because of my standardjbosscmp-jdbc.xml file

<jbosscmp-jdbc>
  | 
  |    <defaults>
  |       <datasource>java:/PostgresDS</datasource>
  |   <!--
  |       <datasource-mapping>Hypersonic SQL</datasource-mapping>
  |   -->
  | 
  |       <datasource-mapping>PostgreSQL 7.2</datasource-mapping>
  | 
  |       <create-table>false</create-table>
  |       <remove-table>false</remove-table>
  |       <read-only>false</read-only>
  |       <read-time-out>300000</read-time-out>
  |       <row-locking>false</row-locking>
  |       <pk-constraint>true</pk-constraint>
  |       <fk-constraint>false</fk-constraint>
  |       <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
  |       <read-ahead>
  |          <strategy>on-load</strategy>
  |          <page-size>1000</page-size>
  |          <eager-load-group>*</eager-load-group>
  |       </read-ahead>
  |       <list-cache-max>1000</list-cache-max>
  | 
  |       <unknown-pk>
  |          <key-generator-factory>UUIDKeyGeneratorFactory</key-generator-factory>
  |          <unknown-pk-class>java.lang.String</unknown-pk-class>
  |          <jdbc-type>VARCHAR</jdbc-type>
  |          <sql-type>VARCHAR(32)</sql-type>
  |       </unknown-pk>
  | 
  |       <entity-command name="default"/>
  |             
  |    </defaults>
  | 
  |    <type-mappings>
  | 
  |       <type-mapping>
  |          <name>PostgreSQL 7.2</name>
  |          <row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 FOR 
UPDATE</row-locking-template>
  |          <pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY 
(?2)</pk-constraint-template>
  |          <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) 
REFERENCES ?4 (?5)</fk-constraint-template>
  |          <auto-increment-template>?1</auto-increment-template>
  |          <alias-header-prefix>t</alias-header-prefix>
  |          <alias-header-suffix>_</alias-header-suffix>
  |          <alias-max-length>32</alias-max-length>
  |          <subquery-supported>true</subquery-supported>
  |          <true-mapping>TRUE</true-mapping>
  |          <false-mapping>FALSE</false-mapping>
  | 
  |          <function-mapping>
  |             <function-name>concat</function-name>
  |             <function-sql>(?1 || ?2)</function-sql>
  |          </function-mapping>
  |          <function-mapping>
  |             <function-name>substring</function-name>
  |             <function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
  |          </function-mapping>
  |          etc.
  |         etc.
  |         etc.



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

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



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to