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've created a model from a legacy database by dragging the tables onto the design surface. The issue I have is some (a small number out of many in the database) associations are not showing on the designer despite having foreign key relationships established in the database. They show up in the model code as xxxxId instead. The database tables consistently use PKID as the primary key and xxxxID as the foreign key column names. I've double checked the relationships in the database. I've removed the tables from the designer surface and put them back again without success. LS is reverse engineering it must be seeing something it doesn't like or perhaps deliberately ignoring a relationship it thinks is invalid... but I'm stumped. I'd be grateful for some pointers as to where to look next. Thanks James LS v4.0.1122.19539 |
|
|
The best thing to do is to examine the CREATE TABLE scripts and compare a couple of 'good' foreign keys to a couple of 'bad' foreign keys. Do the 'bad' ones have anything in common that the 'good' ones do not? I know this is vague, but it's a bit tricky to know what to look for... possible ideas include simple vs. composite FK, naming convention (though it sounds like this is well standardised) and capitalisation/escaping (more plausible if your database is Oracle or PostgreSQL, or MySQL on Linux). In some circumstances we also print information about the schema in the Output window, so try opening the Output window and re-dragging the tables. If nothing jumps out at you maybe you could post a couple of the problem table definitions and we can give them a quick eyeball. |
|
|
Hi Ivan Thanks for your prompt reply and suggestions. I couldn't see any problems so I ended up dropping and recreating the three problem tables which resolved the issue. Thanks James |
|