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 am using the latest ODP client from Oracle, VS 2010. I have access to some synonyms on Oracle DB - tables & views. When I try to drag one of them to LS model appears the message "Unable to create entity definition for XXXX. Check that the table has a primary key defined." The proble is: it has a primary key! I've used before connection from DevArt, it was working. I have no idea if it's a problem of LS or ODP Client... The second issue would be: what about views without primary key? Any chance to use them with LS? - I just want to query the DB, no saves/updates. Is it supported? |
|
|
Hello Greg, The LightSpeed designer does not support synonyms. However, they should work fine at run time. So all you need to do is drag on the table that the synonym refers to, and set the Table Name to be the synonym instead of the actual table. (You can of course rename the entity to match the synonym as well.) We require views to have an ID column that contains unique identifying values. If this column is called Id or ID then you will be fine. If this column is called something else (e.g. PRODUCT_ID) then the designer will give you a warning that it hasn't been able to infer which column is the ID. In this case you must manually map the ID column. To do this, select the entity in the designer and: 1. Change the Identity Type to be the type of the ID column. By #3 I mean e.g. if your view's ID column is PRODUCT_ID, then you have to delete the created ProductId property, because this was mapping the PRODUCT_ID column and that column is now mapped to the identity. |
|