From: Ian B. <ia...@co...> - 2003-04-30 20:45:39
|
On Wed, 2003-04-30 at 15:03, Nick wrote: > How do you create a class that accesses a table with no key? For > example, a Person table references a PhoneNumber where the only 2 > columns are person_id and phone_number (not a reference to another table > but a phone number)? Currently, you can fudge the values of a > RelatedJoin for the correct query to be generated, e.g. > otherClass=intermediateTable and joinColumn=otherColumn, but are the > returned values correct? Will operations work correctly? I would subclass RelatedJoin, changing the performJoin method. In general I think any table that doesn't have a key should be represented with a join, and rows in that table won't be turned into full objects. That means they won't be mutable, but it shouldn't be a problem to just add and delete rows instead of changing them. I'd be happy to include any novel joins people make (like this one). Ian |