I'm using OA with Firebird (I'm making tests).
I create a Domain class, I add some properties and if I look at the database script generated, all the identifiers are lowercase and between ".
For example :
/* Data.Syndic */
CREATE
TABLE
"syndic"
(
"lib"
varchar
(190), /* _lib */
"id"
INTEGER
NOT
NULL
, /* _id */
CONSTRAINT
"pk_syndic"
PRIMARY
KEY
(
"id"
)
);
Ok, it should work like this but it's a big problem using the database with another tool (or even for end users for making queries).
Is there a way force generated sql identifiers to be uppercase (the way firebird works) and remove those " ?
Thank you.
Jean
6 Answers, 1 is accepted
I am afraid that currently there is no way to specify any means of naming strategy for a forward mapping scenario. The idea behind this is basically the fact that when using an ORM you shouldn't really care that much for the database anyway.
Regardless of what gets generated on the database side you can always manipulate what gets generated in your application using our naming settings for reverse map.
The good news is that we are planning to introduce naming setting strategies for forward mapping scenarios that would be pretty much the same as the one we now have for reverse mapping. This however is a future project that will be available with Q3 earliest.
Petar
the Telerik team

I understand that within my application, it is not a problem. But I know that someday, some of my customers will have to develop a specific software that interacts with ma database... And the queries wont be easy to write, helas.
The problem is I'm making important choices today. EF or OA (or anything else), Firebird or SqlServer. It's not easy et I don't know if I can wait till Q3...
Thank you anyway.
Jean
Will it be ok for you if we provide you with an internal build containing functionality to generate your schema name based on your model names (without changing the casing and adding the underscores and etc).
If that works for you I think we can provide you with an internal build by the end of July.
I am looking forward to your reply.
Petar
the Telerik team

That would be great. But I dont't know if I correctly explained the problem.
If my model is for example :
User
ID
Name
GroupID
The schema will be somthing like :
Create Table "Users" (
"ID" integer,
"Name" varchar...
)
And it works but all queries (even those made with other programs) need to mark identifiers with ". For example :
Select "User"."Name" FROM "Users" join "Other" On "Groups"."ID"="Users"."GroupID"
etc.
And it's not allways easy.
The schema generator should generate identifiers without " (sorry I don't know the english word for "). At least with Firebird. Firebird is case independant except if identifiers are between ".
Of course, if you can send me something to try, I can test if the result is what I need.
For now, I'm testing OA using an hand made database (Update model from database...)
Cordialement.
Jean

I saw a problem in the process of creating the model from the database. I don't know if I should explain here or if there is a place to report bugs.
With Firebird, il the table column type is defined with a domain, the "not null" information eventually defined within the domain is not used and the Field member of the model can be null.
Jean
Since this is an issue for you we will expose a setting to turn off the automatic escaping of the relational names we generate. This way you will be able to turn off this setting for your project and hopefully that will do the trick for you.
I will contact you back in this thread once we have a working solution.
Petar
the Telerik team