Watch, Follow, &
Connect with Us
Public Report
Report From:    [ Add a report in this area ]  
Report #:  33218   Status: Closed
Wrong SQL query generation for parent table mapping classes
Project:  C#Builder Build #:  9.0.1935.22056
Version:    10.0 Submitted By:   Kristijan Deberni
Report Type:  Basic functionality failure Date Reported:  8/29/2006 10:21:22 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   241823
Resolution: Inactive (Resolution Comments) Resolved in Build: : 11.0.2804.9245
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Model:

A <|-- A0 <|-- A01
A <|-- A1 <|-- A11

where

A   - abstract, own table mapping
A0 - abstract, parent table mapping
A1  - abstract, parent table mapping
A01 - concrete, parent table mapping
A11 - concrete, parent table mapping

OCL statement "A0.allInstances" couse SQL error
Steps to Reproduce:
1) create model as in description
2) generate database - tested on MS-SQL and firebird
2) run application
4) run EcoSpaceDebugger
5) execute OCL statement "A0.allInstances"
6) exxception raised with message:

Borland.Eco.Persistence.Connection.DatabaseOperationFailedException: Error executing SQL: SELECT A_ALIAS.BOLD_ID, A_ALIAS.BOLD_TYPE FROM A A_ALIAS WHERE (A_ALIAS.BOLD_TYPE IN (, 0))
Execute failed. SQL State: 42000, SQL Error Code: 8180
Statement(s) could not be prepared.
SQL State: 42000, SQL Error Code: 170
Line 1: Incorrect syntax near ','.
---> Borland.Data.Common.BdpException: Execute failed. SQL State: 42000, SQL Error Code: 8180
Statement(s) could not be prepared.
SQL State: 42000, SQL Error Code: 170
Line 1: Incorrect syntax near ','.

   at Borland.Data.Provider.BdpCommand.a(CommandBehavior , ISQLCursor& , Int16& )
   at Borland.Data.Provider.BdpCommand.ExecuteReader()
   at Borland.Data.Provider.BdpCommand.System.Data.IDbCommand.ExecuteReader()
   at Borland.Eco.Persistence.Connection.AbstractIQueryImpl.CreateReader()
   --- End of inner exception stack trace ---
   at Borland.Eco.Handles.ExpressionHandle.DeriveAndSubscribe(ISubscriber valueChangeSubscriber, ISubscriber resubscribeSubscriber)
   at Borland.Eco.Handles.RootedHandleDeriver.DoDeriveAndSubscribe(Boolean subscribe)
   at Borland.Eco.Support.Deriver.AbstractDeriver.set_DeriverState(State value)
   at Borland.Eco.Support.Deriver.AbstractDeriver.Derive()
   at Borland.Eco.Support.Deriver.AbstractDeriver.EnsureCurrent()
   at Borland.Eco.Handles.RootedHandle.EnsureInternalElement()
   at Borland.Eco.Handles.ElementHandle.get_Element()
   at Borland.Eco.Handles.HandleAdapter.Borland.Eco.ObjectRepresentation.IElementProvider.get_Element()
   at Borland.Eco.Handles.RenderedListContents.DoDeriveAndSubscribe(Boolean subscribe)
   at Borland.Eco.Support.Deriver.AbstractDeriver.set_DeriverState(State value)
   at Borland.Eco.Support.Deriver.AbstractDeriver.Derive()
   at Borland.Eco.Support.Deriver.AbstractDeriver.Ensur
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01