On Sun, Oct 31, 2010 at 11:01 PM, Sohail Somani <[email protected]> wrote:
> Hi,
>
> As suggested in the "Memory leaks" thread, I have been attempting to
> upgrade to Wt Dbo 3.1.6.
>
> I've come across a problem however. My code does something like this:
>
> myapp::createTables(); // hand-written sql via execute
> session->mapClass<T>("T"); // Wt's map type to table T, created above
>
> The problem seems to be that I cannot map classes after executing the
> SQL as I get the message:
>
>   Cannot map tables after schema was initialized.
>
> Fine, so I change the code to:
>
> session->mapClass<T>("T"); // Wt's map type to table T, created later
> myapp::createTables(); // hand-written sql via execute
>
> Now the problem seems to be that Wt is actually doing a createTables()
> in the mapClass call as I now get the message:
>
>   table T already exists
>
> So I'm stuck. What is the correct method of writing your own sql to
> create tables?

createTables only creates tables, if they already exist, then do not call it.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to