You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by peter neubauer <pe...@yahoo.se> on 2002/08/22 16:34:03 UTC

no select in SQL statement in Torque?

Hi,
I tried to extend the TurbineUser by making an alias in my app-schema.
The code compiles, however, when I want to execute
member.getAppUser (extends TurbineUser), I get an error:

Invocation of method 'getAppUser' in  class .....om.Member threw
exception class org.apache.torque.TorqueException : Syntax error or
access violation: You have an error in your SQL syntax near 'FROM
TURBINE_USER WHERE (TURBINE_USER.USER_ID=3)' at line 1

It seems that there is no select in the SQL. Why? My app-schema looks
something like

 <table name="APP_USER" javaName="AppUser" alias="TurbineUser"
  	baseClass="com.app.om.TurbineUserAdapter"
	basePeer="com.app.om.TurbineUserPeerAdapter">
    <!-- Unique identifier -->
    <column name="USER_ID" primaryKey="true" required="true"
type="INTEGER"/>
  </table>
<table name="MEMBER" idMethod="idbroker">
    <column name="MEMBER_ID" required="true" primaryKey="true"
type="INTEGER"/>
    <column name="NAME" size="255" type="VARCHAR"/>
    <column name="FIRST_NAME" required="true" size="99" type="VARCHAR"/>
    <column name="LAST_NAME" required="true" size="99" type="VARCHAR"/>
    <column name="EMAIL" size="99" type="VARCHAR"/>
    <column name="CONFIRM_VALUE" size="99" type="VARCHAR"/>
    <column name="POINTS" type="INTEGER" default="0"/>
    <column name="BRANCH_ID" type="INTEGER" description=""/>
    <column name="INFO" type="LONGVARCHAR" description=""/>
    <column name="LOOKING_FOR" type="LONGVARCHAR" description=""/>
    <column name="PHOTO_ID" type="INTEGER" description=""/>
    <column name="USER_ID" type="INTEGER" description=""/>
    <foreign-key foreignTable="FOTONYTT_USER">
      <reference local="USER_ID" foreign="USER_ID"/>
    </foreign-key>
  </table>

Thanks for any hints!

/peter

_____________________________________________________
Gratis e-mail resten av livet p� www.yahoo.se/mail
Busenkelt!

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>