This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi All, I am just testing LightSpeed Express. I use it for a first time. I try to connect to oracle 10g database. I am able to drop tables on model but when I drop on a model stored procedure nothing happens. Same feature works for MS SQL 2005. Is this feature supported for oracle database?? Does it work? Thanks for answers
|
|
|
It is supported for Oracle databases, but because of the way Oracle metadata works, it can fail with some sprocs. The reason is that we have to actually call the sproc in order to figure out what columns it returns. If the sproc fails on the dummy data we send it, or if it returns results in a way we don't expect, the designer can't figure out the columns. The probable cause is that your stored proc doesn't fit the LightSpeed convention of returning its results through an out parameter of type ref cursor named 'results'. The name is important -- see 'Stored Procedure Requirements and Conventions' on the Stored Procedures help page. If you are using an existing database it's unlikely it's been built with the LightSpeed conventions in mind! Current nightly builds should do a better job of detecting this scenario and explaining what the issue is. |
|
|
Hi, Naming the ref cursor "results" works with one ref cursor, but what about returning multiple ref cursors? Its quite common to return multiple ref cursors from one stored procedure so that one doesn't have to hit the database multiple times. IMO, it should be possible to explicitly name the ref cursor(s) otherwise one would have to define wrappers for each SP just so that lightspeed can use them. However, it would be good to know if any solution for mulitple ref cursors is possible for now e.g. results1, results2, results3 etc. :-) cheers, Simon. |
|
|
Hmm, it sounds like you're effectively talking about eager loading using stored procedures. Interesting. That would be a cool feature to have and I've logged a feature request for it, but it's not something we support at the moment. The best you can do, I'm afraid, is to return the additional ref cursors as out parameters, but this will just give you IDataReaders rather than entities -- not very useful. Obviously, if you can use tables or views instead of a stored procedure then you can use the normal eager load functionality to load multiple collections of entities in a single hit. To help us prioritise this: you say this is a "common" pattern, but it's not one we've come across before: can you give us some idea of how widely this is used within your project(s) and within the Oracle community in general? Can you give us some info about the use cases for the pattern? Thanks! |
|