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 to all. I'm evaluating LightSpeed, so, please bear with me if the question is "noobish". I have configured LightSpeed in a way that it works correctly (i can execute queries to retrieve data), but whenever i try to insert a new record I get the errore: ORA-00942: table or view does not existHere is the code: using (var unitOfWork = context.CreateUnitOfWork()) {var ordine = new Ordine(); ordine.IdUtenteId = 1; ordine.DtOrdine = DateTime.Now; unitOfWork.Add(ordine); unitOfWork.SaveChanges(); } Any suggestion? Thanks |
|
|
Hi Pistacchio, Thanks for your query. Could you tell me what IdentityMethod you have configured on your LightSpeedContext? If you haven't set one then LightSpeed will be defaulting to using the KeyTable identity method which requires the KeyTable table to exist. For the scripts, check out: C:\Program Files\Mindscape\LightSpeed 2.2\Providers\Oracle9 ODP Or the non ODP oracle directory. Just create the keytable and you'll be sorted. When using the keytable LightSpeed will attempt to fetch a batch of identities that it can use as part of the save process and hence will fall over if it's not there. We have got it noted down on our backlog to make this message more friendly (or better yet, just create the table if needed). Could you try that out and let me know if you still have any issues? Also, since you're new, I'd love to know how you found LightSpeed in the first place! Hope that helps, John-Daniel Trask |
|
|
Hi John-Daniel, ---- DROP TABLE KeyTable; CREATE TABLE KeyTable INSERT INTO KeyTable VALUES (1); EXIT; ---- Could you suggest how to write it or more generally what this file is for? I wasn't aware of the problem, supposing that the LightSpeed graphic designer would do the whole work of mapping objects to tables. On the product, I'm evaluating it for my company that eventually will buy it. So far I've only scratched the surface, but it feels just "right": it is a very elegant product, I love the good integration within VisualStudio and you are usually very fast in providing assistance. One thing I'd love to have is a better documentation with complete examples and some Getting Started tutorial, as the only one I was able to come across is a screencast. |
|
|
Hi pistacchio, As JD mentioned, if you don't explicitly set the identity method, then LightSpeed defaults to KeyTable, meaning it will try to retrieve identities from a table named KeyTable. KeyTable is a dead simple table with just one row and one column, containing the next ID to be allocated. As you can see, the idea of KeyTable is that it is kind of like an Oracle sequence, but done in a way that can work on any database. So in order to do inserts, you need to create the KeyTable table. To do this, just run the SQL script you have located. You are right that it is "sort of empty" but this is because KeyTable is, as noted, very simple. I like the idea of putting something in the designer to help set up key tables or sequences -- we'll look into that. Also thanks for the feedback on the documentation. We do provide a starter tutorial in the help file under Walkthroughs > Quick Start (there are versions for hand-coded entities and for using the designer), but we'd welcome any feedback on how we could make this better and/or easy to find. |
|