From: <to...@te...> - 2004-08-18 14:49:40
|
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 |