On Sun, Jul 25, 2010 at 1:44 AM, Koen Deforche <[email protected]> wrote:
> Hey,
>
> Crashing is Wt::Dbo's unmature way to tell you that something is wrong.
> This should work (as is done for the Comment class in the blog example):
>> Also, is is possible to place a NULL value in the database using wt::dbo?
>
> Yes, use boost::optional<T>
>
>> class Part;
>> namespace dbo = Wt::Dbo;
>> class Part : public dbo::Dbo {
>>  public:
>>    dbo::ptr<Part>      parent;
>
>      dbo::collection< dbo::ptr<Part> > children;
>
>>    std::string         refdes;
>>    std::string         value;
>>
>>    template<class Action>
>>    void persist(Action& a) {
>>        dbo::belongsTo(a, parent,       "part");
>
>          dbo::hasMany(a, children, "part");
>
>>        dbo::field(a, refdes,           "refdes");
>>        dbo::filed(a, value,            "value");
>>    }
>> };
>> DBO_EXTERN_TEMPLATES(Part);
>>
>
> Regards,
> koen

I tried that before, but I must have had something else wrong, because
it works now.  Thanks.

Eric

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to