UnidirectionalOneToManyMapping yeesh!

View: New views
4 Messages — Rating Filter:   Alert me  

UnidirectionalOneToManyMapping yeesh!

by cowwoc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I ran across http://wiki.eclipse.org/EclipseLink/Development/JPA2.0/uni-directional_onetomany_mapping by chance. I wanted to take this opportunity to give some feedback ;)

The proposed code "smells" so bad I don't know where to begin. A few glaring cosmetic issues:

1) Extremely long class names such as UnidirectionalOneToManyMapping and UnidirectionalOneToManyRelationMaintanenceMode. What are you thinking?! In my experience long names are usually a strong indication that something more fundamental is wrong.

2) UnidirectionalOneToManyRelationMaintanenceMode.RemoveNowait versus RemoveNoWait... It's annoying when people misuse camelCase :)

3) In my view, you are better off defining a new OneToMany in a new package than creating these new classes.

Honestly, this page is freaking me out. If this is what JPA 2.0 is heading towards then I foresee a lot of people jumping ship. Please keep JPA as simple and clean as possible. Just my 2 cents :)

Re: UnidirectionalOneToManyMapping yeesh!

by Andrei Ilitchev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
The answers are inline
----- Original Message -----
From: "cowwoc" <cowwoc@...>
Sent: Thursday, October 30, 2008 3:43 PM
Subject: [eclipselink-users] UnidirectionalOneToManyMapping yeesh!

>
> Hi,
>
> I ran across
>
http://wiki.eclipse.org/EclipseLink/Development/JPA2.0/uni-directional_onetomany_mapping
> by chance. I wanted to take this opportunity to give some feedback ;)
>
> The proposed code "smells" so bad I don't know where to begin. A few glaring
> cosmetic issues:
>
> 1) Extremely long class names such as UnidirectionalOneToManyMapping and
> UnidirectionalOneToManyRelationMaintanenceMode. What are you thinking?!
I am thinking that UnidirectionalOneToManyMapping is a good name: it describes exactly what the mapping is.
Also I am thinking that it's a working document the main purpose of which
is to communicate requirements, pinpoint possible problems, suggest alternative solutions for them etc. -
but not necessarily spend precious time on every last detail.
BTW, The feature has been already implemented in 1.1 (see http://bugs.eclipse.org/241414):
UnidirectionalOneToManyMapping has been added to the code,
but UnidirectionalOneToManyRelationMaintanenceMode hasn't been.
 In
> my experience long names are usually a strong indication that something more
> fundamental is wrong.
In my experience they are not.
>

> 2) UnidirectionalOneToManyRelationMaintanenceMode.RemoveNowait versus
> RemoveNoWait... It's annoying when people misuse camelCase :)
>
> 3) In my view, you are better off defining a new OneToMany in a new package
> than creating these new classes.

>
> Honestly, this page is freaking me out. If this is what JPA 2.0 is heading
> towards then I foresee a lot of people jumping ship. Please keep JPA as
> simple and clean as possible. Just my 2 cents :)
> --
> View this message in context:
http://www.nabble.com/UnidirectionalOneToManyMapping-yeesh%21-tp20254023p20254023.html
> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> eclipselink-users mailing list
>
eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: UnidirectionalOneToManyMapping yeesh!

by cowwoc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrei Ilitchev wrote:
> my experience long names are usually a strong indication that something more
> fundamental is wrong.
In my experience they are not.
Really? You see nothing wrong with UnidirectionalOneToManyRelationMaintanenceMode? Doesn't anyone else take issue with this?

Why can't you integrate this functionality into the existing OneToMany? Why can't you create a new OneToMany in a different package name? Why can't you use nested classes to break this down into smaller components? There are countless different ways to improve upon this.

Re: UnidirectionalOneToManyMapping yeesh!

by Andrei Ilitchev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

UnidirectionalOneToMany follows the exsisting patterns long established in
Eclipselink.
Our most precious resource here (believe it or not) is time - there are so
many real issues to be resolved.
----- Original Message -----
From: "cowwoc" <cowwoc@...>
To: <eclipselink-users@...>
Sent: Friday, October 31, 2008 12:38 PM
Subject: Re: [eclipselink-users] UnidirectionalOneToManyMapping yeesh!


>
>
> Andrei Ilitchev wrote:
>>
>>> my experience long names are usually a strong indication that something
>>> more
>>> fundamental is wrong.
>> In my experience they are not.
>>
>
> Really? You see nothing wrong with
> UnidirectionalOneToManyRelationMaintanenceMode? Doesn't anyone else take
> issue with this?
>
> Why can't you integrate this functionality into the existing OneToMany?
> Why
> can't you create a new OneToMany in a different package name? Why can't
> you
> use nested classes to break this down into smaller components? There are
> countless different ways to improve upon this.
> --
> View this message in context:
> http://www.nabble.com/UnidirectionalOneToManyMapping-yeesh%21-tp20254023p20269392.html
> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users