Project

General

Profile

Bug #4773

Wt::Dbo having 2 member item with same class : cannot create a table with 2 member item of same class

Added by Rathnadhar K V almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
02/28/2016
Due date:
03/03/2016
% Done:

0%

Estimated time:
3.00 h

Description

Namasthe,

class address

{

Wt::WString address_line1;

Wt::WString address_line2;

Wt::WString address_line3;

template

void persist(Action& action)

{

Wt::Dbo::field(action, address_line1, "address_line1");

Wt::Dbo::field(action, address_line2, "address_line2");

Wt::Dbo::field(action, address_line3, "address_line3");

}

};

class user

{

private:

address home_address;

address office_address;

template

void persist(Action& action)

{

user_office_address.persist(action);

user_meeting_address.persist(action);

}

};

If I try connection->createTables() with above class (suitably mapclassed)..then dbo object throws an exception.

Perhaps the createTable is trying to create 2 columns with same name (eg: address_line1, address_line2, address_line3)...

This is a critical bug. This needs to be resolved. I should have ability to create class items from an another class any number of times.

Regards

Rathnadhar K V

Also available in: Atom PDF