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, I'm trying to model a three-way link. I've created three Entities: Person Role Asset and an entity (call it PersonRoleAsset) that contains only a reference to each of the entities above. (There is a one to many association between PersonRoleAsset and each of the other entites) So the PersonRoleAsset entity describes the Role that a particular Person has with regard to a particular Asset. I know this could be simplified to represent the Role as a single property on a through association entity between Asset and Person but I am also trying to store information relevant to each Role (obviously name, but also things like the permissions it bestows on the relationship between the Person and Asset). I haven't created any through associations. When I try to access PersonRoleAsset or Role through my Dynamic Data website LightSpeed gives this error: Query Error: Could not find field [Person] on model [Role] It looks like the database schema was created correctly (by the LS designer) but as expected, there is no column in the Role table called Person (or even PersonId since that is in the PersonRoleAsset table). Is there some way I can get LightSpeed to work with this model? Many thanks, Chris |
|
|
Could you provide us with a project that reproduces this problem? It sounds like something incorrectly thinks that Role has a Person field, but I'm not sure what would be thinking that or why, so it would be helpful for us to see the code. Also, am I right in thinking this error occurs only in dynamic data? It works okay when querying for PersonRoleAssets or Roles from your own code? |
|
|
Oops! 1) This error message is simply because I had forgotten that I had put an "Order By" string in the Role class many weeks ago, before I had settled on this particular model structure. So the query was simply trying to order by Person because I had asked it to. Sorry! A three-way association seems to work perfectly :-) 2) OT: I've been posting some messages with our finance manager's login details becuase I have to log in with that account to download the latest Enterprise nightly. I will be more careful in future but if your systems support some way of enabling this account to download those nightlies then that would be helpful. Or maybe another option might be to display the currently logged in user at the top of the page? Thanks, Chris |
|