bug in sp generator
Tomasz Dreßler <[email protected]> Wed, 18 Aug 2004 16:49:30 +0200
| Newsgroups | gmane.comp.lib.sql.sqlpp |
|---|---|
| Message-ID | <[email protected]> |
Hi, maybee I found an small error witch generates wrong stored procedures. When I ask a SP to find records by a field witch is itselfs a reference with a prefix, sqlpp will create querry's without prefix. Hope it helps Greetings Tomek Example --------------------------------- <table id="C" name="Client" > <field id="C_ID" name="ID" type="INT" primary-key="true" /> </table> <table id="B" name="Brake" > <field id="BText" name="Text" type="NVARCHAR(30)" /> <reference id="ref" ref-table="C" field-prefix="X_" /> </table> <procedure name="getBrakesPerClient"> <columns> <column alias="Text"> <link tableref="B" fieldref="Text" /> </column> </columns> <from> <qtable ref="Brake" alias="B" /> </from> <where> <equal> <left><link tableref="B" fieldref="ID"/></left> <right><local name="clientID" type="INT" /></right> </equal> </where> </select> </procedure> CREATE PROCEDURE dbo.[SP_getBrakesPerClient] @clientID INT AS SELECT B.Text AS 'Text' FROM dbo.[Brakes] AS B WHERE B.ID = @clientID ' #### But it is B.X_ID #### GO ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285