On Mon, Jan 18, 2010 at 3:57 AM, OvermindDL1 <[email protected]> wrote:
> /* snip */

I have an entity like this:

class Group;
typedef dbo::collection< dbo::ptr<Group> > Groups;
class Group
{
public:
        /* snip */
        Groups      groups;
        Groups      isSubGroupOf;
        /* snip */

        template<class Action>
        void persist(Action& a)
        {
                /* snip */
                dbo::hasMany(a, groups,       dbo::ManyToMany, 
"Group_Group_Link");
                dbo::hasMany(a, isSubGroupOf, dbo::ManyToMany, 
"Group_Group_Link");
                /* snip */
        }
};

Either instead of setting the id for both sides of the ManyToMany
relationship as Group_id, should it not do Group_id1 and Group_id2, or
perhaps let hasMany take a 5th parameter that lets you name the
variable this side represents in the ManyToMany table so I could do
something like this:
                /* snip */
                dbo::hasMany(a, groups,       dbo::ManyToMany, 
"Group_Group_Link",
"Group_id_parent");
                dbo::hasMany(a, isSubGroupOf, dbo::ManyToMany, 
"Group_Group_Link",
"Group_id_child");
                /* snip */

And yes, as stated in the other email, my Groups table I still have to
mapClass as "_Group" since table names are still not quoted, I am
running from the latest git version as of about 36 hours ago.

At the moment, anytime I run the server any session I create just
insta-dies that to duplicate _Group_id variable names in the
Group_Group_Link table.

And we need a way to redefine an existing table, at the very least to
add columns to it so I do not have to save out and re-enter my data
every time I make a change.  Even something like setting a static
version number to the entity class along with a function that lets me
describe change from version to version would be perfect, then I can
say what to remove, what to add, how to reformat something, etc...
propagating all the way through the changes.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to