You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by Maxim Solodovnik <so...@gmail.com> on 2013/02/08 06:30:19 UTC

DB is broken after latest refactoring

Hello Sebastian,

It seems like OM is not working with derby DB anymore.
It seems like it is impossible to create "user" table in derby DB.

I believe we should choose another name for the DB table.
I'm currently testing with name 'om_user', maybe you have better name in
mind?

-- 
WBR
Maxim aka solomax

Re: DB is broken after latest refactoring

Posted by Maxim Solodovnik <so...@gmail.com>.
Ah OK,
I hope it will be resolved
I'd like "user" more than om_user :)


On Sat, Feb 9, 2013 at 12:11 PM, seba.wagner@gmail.com <
seba.wagner@gmail.com> wrote:

> And it is not even in the schema builder, its in the SQL query that
> requests the user,
> so the "table" (or actual .dat or whatever files Derby creates and puts
> the data in) are there.
> But the SQL query doesn't work cause IMHO the keyword "user" has to be
> escaped correctly in the query.
> Lets contact the OpenJPA list.
>
> Sebastian
>
>
> 2013/2/9 seba.wagner@gmail.com <se...@gmail.com>
>
> No what I meant was:
>> There have been a number of such issues with Hibernate and OpenJPA in the
>> past, for example you could not create a column with the name "open"
>> because "open" is a reserved word in SQL and Hibernate or OpenJPA did not
>> correctly escape that column name in their schema builder libraries. The
>> same with various fields in Oracle or MySQL. I have been changing the
>> column names a number of times because of that, but later versions of the
>> specific ORM did fix those bugs so you could use the column or table name
>> that you wanted.
>>
>> So I rather think that this error is an issue/bug within OpenJPA and the
>> schema util that creates the database. I don't think that it is a
>> requirement of Apache Derby that you can't use certain strings as table or
>> column name, you simply need to correctly escape them.
>>
>> Sebastian
>>
>>
>>
>> 2013/2/9 Maxim Solodovnik <so...@gmail.com>
>>
>>> I guess Derby has no "databases" and might already has table user
>>> (built-in)
>>> On Feb 9, 2013 9:44 AM, "seba.wagner@gmail.com" <se...@gmail.com>
>>> wrote:
>>>
>>>> It might be possible to correctly put the name in quotes. I cannot
>>>> believe Derby allows no table named "user" at all.
>>>>
>>>> Sebastian
>>>> Am 08.02.2013 18:30 schrieb "Maxim Solodovnik" <so...@gmail.com>:
>>>>
>>>>> Hello Sebastian,
>>>>>
>>>>> It seems like OM is not working with derby DB anymore.
>>>>> It seems like it is impossible to create "user" table in derby DB.
>>>>>
>>>>> I believe we should choose another name for the DB table.
>>>>> I'm currently testing with name 'om_user', maybe you have better name
>>>>> in mind?
>>>>>
>>>>> --
>>>>> WBR
>>>>> Maxim aka solomax
>>>>>
>>>>
>>
>>
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> seba.wagner@gmail.com
>>
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>



-- 
WBR
Maxim aka solomax

Re: DB is broken after latest refactoring

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
And it is not even in the schema builder, its in the SQL query that
requests the user,
so the "table" (or actual .dat or whatever files Derby creates and puts the
data in) are there.
But the SQL query doesn't work cause IMHO the keyword "user" has to be
escaped correctly in the query.
Lets contact the OpenJPA list.

Sebastian


2013/2/9 seba.wagner@gmail.com <se...@gmail.com>

> No what I meant was:
> There have been a number of such issues with Hibernate and OpenJPA in the
> past, for example you could not create a column with the name "open"
> because "open" is a reserved word in SQL and Hibernate or OpenJPA did not
> correctly escape that column name in their schema builder libraries. The
> same with various fields in Oracle or MySQL. I have been changing the
> column names a number of times because of that, but later versions of the
> specific ORM did fix those bugs so you could use the column or table name
> that you wanted.
>
> So I rather think that this error is an issue/bug within OpenJPA and the
> schema util that creates the database. I don't think that it is a
> requirement of Apache Derby that you can't use certain strings as table or
> column name, you simply need to correctly escape them.
>
> Sebastian
>
>
>
> 2013/2/9 Maxim Solodovnik <so...@gmail.com>
>
>> I guess Derby has no "databases" and might already has table user
>> (built-in)
>> On Feb 9, 2013 9:44 AM, "seba.wagner@gmail.com" <se...@gmail.com>
>> wrote:
>>
>>> It might be possible to correctly put the name in quotes. I cannot
>>> believe Derby allows no table named "user" at all.
>>>
>>> Sebastian
>>> Am 08.02.2013 18:30 schrieb "Maxim Solodovnik" <so...@gmail.com>:
>>>
>>>> Hello Sebastian,
>>>>
>>>> It seems like OM is not working with derby DB anymore.
>>>> It seems like it is impossible to create "user" table in derby DB.
>>>>
>>>> I believe we should choose another name for the DB table.
>>>> I'm currently testing with name 'om_user', maybe you have better name
>>>> in mind?
>>>>
>>>> --
>>>> WBR
>>>> Maxim aka solomax
>>>>
>>>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: DB is broken after latest refactoring

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
No what I meant was:
There have been a number of such issues with Hibernate and OpenJPA in the
past, for example you could not create a column with the name "open"
because "open" is a reserved word in SQL and Hibernate or OpenJPA did not
correctly escape that column name in their schema builder libraries. The
same with various fields in Oracle or MySQL. I have been changing the
column names a number of times because of that, but later versions of the
specific ORM did fix those bugs so you could use the column or table name
that you wanted.

So I rather think that this error is an issue/bug within OpenJPA and the
schema util that creates the database. I don't think that it is a
requirement of Apache Derby that you can't use certain strings as table or
column name, you simply need to correctly escape them.

Sebastian



2013/2/9 Maxim Solodovnik <so...@gmail.com>

> I guess Derby has no "databases" and might already has table user
> (built-in)
> On Feb 9, 2013 9:44 AM, "seba.wagner@gmail.com" <se...@gmail.com>
> wrote:
>
>> It might be possible to correctly put the name in quotes. I cannot
>> believe Derby allows no table named "user" at all.
>>
>> Sebastian
>> Am 08.02.2013 18:30 schrieb "Maxim Solodovnik" <so...@gmail.com>:
>>
>>> Hello Sebastian,
>>>
>>> It seems like OM is not working with derby DB anymore.
>>> It seems like it is impossible to create "user" table in derby DB.
>>>
>>> I believe we should choose another name for the DB table.
>>> I'm currently testing with name 'om_user', maybe you have better name in
>>> mind?
>>>
>>> --
>>> WBR
>>> Maxim aka solomax
>>>
>>


-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: DB is broken after latest refactoring

Posted by Maxim Solodovnik <so...@gmail.com>.
I guess Derby has no "databases" and might already has table user (built-in)
On Feb 9, 2013 9:44 AM, "seba.wagner@gmail.com" <se...@gmail.com>
wrote:

> It might be possible to correctly put the name in quotes. I cannot believe
> Derby allows no table named "user" at all.
>
> Sebastian
> Am 08.02.2013 18:30 schrieb "Maxim Solodovnik" <so...@gmail.com>:
>
>> Hello Sebastian,
>>
>> It seems like OM is not working with derby DB anymore.
>> It seems like it is impossible to create "user" table in derby DB.
>>
>> I believe we should choose another name for the DB table.
>> I'm currently testing with name 'om_user', maybe you have better name in
>> mind?
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>

Re: DB is broken after latest refactoring

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
It might be possible to correctly put the name in quotes. I cannot believe
Derby allows no table named "user" at all.

Sebastian
Am 08.02.2013 18:30 schrieb "Maxim Solodovnik" <so...@gmail.com>:

> Hello Sebastian,
>
> It seems like OM is not working with derby DB anymore.
> It seems like it is impossible to create "user" table in derby DB.
>
> I believe we should choose another name for the DB table.
> I'm currently testing with name 'om_user', maybe you have better name in
> mind?
>
> --
> WBR
> Maxim aka solomax
>

Re: DB is broken after latest refactoring

Posted by Maxim Solodovnik <so...@gmail.com>.
I'll answer myself: I'm going to rename DB table for User object to be
om_user, so derby will work.
Please rename it to something else if you feel it should have different name


On Fri, Feb 8, 2013 at 12:30 PM, Maxim Solodovnik <so...@gmail.com>wrote:

> Hello Sebastian,
>
> It seems like OM is not working with derby DB anymore.
> It seems like it is impossible to create "user" table in derby DB.
>
> I believe we should choose another name for the DB table.
> I'm currently testing with name 'om_user', maybe you have better name in
> mind?
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax