Hey John,

2011/5/31 John Robson <[email protected]>

> Hello everyone.
>
> I created a relationship N-M:
>
> User:
> Wt::Dbo::hasMany(a, projects, Wt::Dbo::ManyToMany, "users_has_projects");
>
> Project:
> Wt::Dbo::hasMany(a, users, Wt::Dbo::ManyToMany, "users_has_projects");
>
> How do I add fields (attributes) in the table "users_has_projects" ?
>
Strictly speaking, the join table does not represents a class of entities.
But only entity can contains attributes. Therefore, in you case,
"users_and_projects" must be considered as entity rather than the join table
(which always serves only as an implementation detail on the physical, i.e.
the database level, while entities are always should be considered on
logical,
i.e. the project level) because it contains attributes.

PS, consider to rename "users" to "user" and "projects" to "project"
according to classical entity-relationship models, because
the terms "one-to-many" or "many-to-many" are meaningless
if entities are named in plural.


> Directly by PostgreSQL, or I can do this by Wt?!
>
> Thank you,
>
> John
>
>
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>



-- 
// Dmitriy.
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to