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
|
I realize this use case is antithetical to an ORM/DAL's purpose, but is there some way for the Lightspeed engine to handle a raw SQL string and 1) sanitize it of course then 2) compile and execute it, returning a collection? For example: select x.* from x inner join y on x.somerandomidentifier = y.somerandomidentifier order by x.somevalue where x.someattribute='some value'; so the result set in this example would be a (possibly predictable) entity of type x but might be an arbitrary set of columns x.1, x.2,x.5,y.4, y.5 or whatever. Is it possible to pass this string (with whatever formatting is necessary) to Lightspeed and get the results back? Sort of a dynamic entity based on a SQL string. Again, apologies to the purists but I am working with legacy database and legacy code. More like a blackfield than a brownfield... Thank you. |
|
|
Hi, The closest you can get is what's detailed in this older thread: http://www.mindscapehq.com/forums/thread/2390 However, we can't do 'dynamic entities', it needs to match an existing entity, include an ID field and all other requirements that LightSpeed has. I hope that helps, John-Daniel Trask |
|