FriendsOfSymfony/FOSUserBundle — Issue #561: Issue with oracle 10g
Author: swordi
Created: 2012-03-06 13:31:37+00:00
State: open

Hello,

I am currently trying to setup FOSUserBundle with Oracle 10g in a Symfony2 project. The problems I am going through are that Oracle doesn't have a Boolean data type and when creating the table using Doctrine I got an exception for the columns which should be defined as Boolean:

My oracle auto-generate table:

create table user(
[...]
locked NUMBER(1) not null,
[...]
);
The exception i got when using the command line to add a new user.

[PDOException]

SQLSTATE[HY000]: General error: 1400 OCIStmtExecute: ORA-01400: cannot insert
NULL into ("ENT_ADMIN"."ECO_USER"."LOCKED")
(ext\pdo_oci\oci_statement.c:148)

So i decided to override the ..\Model\User class of the Bundle by changing false into -1 and true into 1. I assume it isn't a good idea. Anyone has an idea how to proceed properly?

Regards