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 have three tables: Brand Agency AgencyBrand (M:M) The AgencyBrand table is represented by an auto through entity in the LS model. We're encountering a problem when we attempt to remove a Brand from the table - LS complains: "Invalid Object Name 'AgencyBrand'" The Agency and, therefore, the AgencyBrand tables aren't currently in use - empty tables - but they are present in the LS model. Why is LS complaining about the AgencyBrand table when we try to remove a Brand? Cascade deletes has been turned off, and we haven't explicitly attempted to remove rows from the AgencyBrand table. Thanks |
|
|
I think this may be due to schemas - I'm running some more tests. If schemas are indeed the cause of the problem, it'd be helpful to be able to set the schema for an auto through entity. From searching the forum, I've seen this request crop up before. I still don't know why it was actually trying to access the table, though, as we're not currently employing the Agency table (and therefore the through entity). |
|
|
If you need to set a schema on a through entity it needs to be explicit and not auto generated. In terms of why the table is being selected from, updated or deleted from when removing the parent entity is that we need to trigger an update/delete for any through entities which rely on the entity being removed so the first case for this is to select in any entities for that collection to see if anything needs to be removed. I am guessing it will be a SELECT statement which is failing which would match with your assumption about it being a schema related issue.
|
|
|
Thanks for the clarification Jeremy. It's a shame I have to use an explicit through entity just to be able to specify a schema ('cause they clutter the model), but at least Lighspeed has me covered. |
|