Behavior of NamingConvention for table names

71 views
Skip to first unread message

hastebrot

unread,
Oct 7, 2010, 2:05:34 PM10/7/10
to Ebean ORM
Consider these JUnit tests: http://pastebin.com/Yh2LAy9G

With the current version of EBean the second test fails.

My intention is, that if schema and/or catalog is set in
NamingConvention, they are used as TableName if they are not set in
the @Table-annotation.

I changed AbstractNamingConvention#getTableName() to reflect this
changes.

http://pastebin.com/Rmf6xARq

So my question is: is it intented, that schema/catalog in
NamingConvention are completely ignored, if a @Table-annotation for
the beanclasses is given?

If so, I can use my own derived class from AbstractNamingConvention
and pass it into ServerConfig#setNamingConvention(), so there is not
problem.

Greetings from Hannover, Germany.

Benjamin

Rob Bygrave

unread,
Oct 12, 2010, 9:07:14 PM10/12/10
to eb...@googlegroups.com
I see your point (good testcases ... easy to see your point). 

I'll have to run this past Eddie to see what he thinks.

Cheers, Rob.

edge

unread,
Oct 31, 2010, 4:34:18 AM10/31/10
to Ebean ORM
well I think the NamingConvention should always have highest priority
and be able to ignore annotations. I think we initially had it working
like that and then there were some changes made that may have bypassed
the naming convention - it consider such behaviour as a bug.

Rob Bygrave

unread,
Nov 2, 2010, 4:54:50 AM11/2/10
to eb...@googlegroups.com
>> consider such behaviour as a bug.

Logged as BUG 334  - I have applied Benjamin's suggested code change as patch.
Reply all
Reply to author
Forward
0 new messages