gabordemooij/redbean — Issue #129: dispense function doesn't work with upper-case names
Author: mmazzariol-sn
Created: 2012-02-21 11:03:46+00:00
State: open

In Windows environment if I try to use this:

$xyz = R::dispense( 'XYz' );

Redbean stores correctly the first time the new bean but if I try again with the same code Redbean stops working with this error message:

PHP Fatal error: Uncaught [42S01] - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'xyz' already exists
thrown in C:\xyz\rb.php on line 105

To fix this I just wrote my bean name in lower-case and it seems to work in all cases:

$xyz = R::dispense( 'xyz' );

This should be checked in Redbean backend.