From: Alex B. <en...@tu...> - 2001-08-17 18:51:44
|
>> I can see use in having separate "settings" for the database and the app. > Jepp. I think this is neccessary. > > Another question. Can a entity span say parts of one or more tables? > Something similar like a view in SQL? "Sort of" you can embed entity references (called pointers) in entity definitions. so you can say: user_id user_name user_password address_id -> address i.e. "get the address entity with this id" > In the example the complete db entitys are mapped in the definition. And so > querys are genearated for all fields. But that might me overhead. So I would > like to define a entity that spans parts of tables. > > E.g. If I have a enty defined called "Subscriptions" that span the > tables.fields: > > user.userId > user.login > smssubscriptions.userId > smssubscritpions.serviceId > emailsubscriptions.userId > emailsubscriptions.serviceId > > but the tbl user has more fields I do not need to query for this entity. But > for this one it's just fine. I don't see why not. I don't _think_ entityManager supprts that currently but I have no problem with the idea as long as its implemented properly :) ------------ Actually, along these lines: does anyone have any qualms about making this assumption?: -Entity Field names must correspond exactly to table field names (we could get rid of the schema map if we did this) It would simplify a lot of the code, I think. _a |