Quantcast

CompositeUserType: default property -> column mapping?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CompositeUserType: default property -> column mapping?

longwa
It would be nice to have default column mappings for CompositeUserType's in hibernate. Is there an existing ticket or any resistance to having Grails call:

public String[] getPropertyNames();

on a user-type mapping that's composite and use a convention of:

basePropertyName_subPropertyName

similary to embedded types? We use alot of Money and Periods and are looking at moving to the JSR-310 eventually (using jadira usertypes). This seems like it would be a nice-to-have convention.

Right now, without a column mapping, you get something like:

property mapping has wrong number of columns: test.Book.published type: org.jadira.usertype.dateandtime.joda.PersistentDateTimeAndZoneWithOffset

Yeah? Nay?

-Aaron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CompositeUserType: default property -> column mapping?

Graeme Rocher-2
Perhaps an example of what you want to achieve attached to a JIRA
feature request would help

On Thu, May 8, 2014 at 7:35 PM, Aaron Long <[hidden email]> wrote:

> It would be nice to have default column mappings for CompositeUserType's in
> hibernate. Is there an existing ticket or any resistance to having Grails
> call:
>
> public String[] getPropertyNames();
>
> on a user-type mapping that's composite and use a convention of:
>
> basePropertyName_subPropertyName
>
> similary to embedded types? We use alot of Money and Periods and are looking
> at moving to the JSR-310 eventually (using jadira usertypes). This seems
> like it would be a nice-to-have convention.
>
> Right now, without a column mapping, you get something like:
>
> property mapping has wrong number of columns: test.Book.published type:
> org.jadira.usertype.dateandtime.joda.PersistentDateTimeAndZoneWithOffset
>
> Yeah? Nay?
>
> -Aaron



--
Graeme Rocher
Grails Project Lead
SpringSource

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CompositeUserType: default property -> column mapping?

longwa
Graeme, I created https://jira.grails.org/browse/GRAILS-11387 to outline the request.

I can tackle the implementation but I wanted to make sure I wasn't missing anything obvious with the request before I started work. Seems reasonable to me.


On Thu, May 8, 2014 at 5:18 PM, Graeme Rocher <[hidden email]> wrote:
Perhaps an example of what you want to achieve attached to a JIRA
feature request would help

On Thu, May 8, 2014 at 7:35 PM, Aaron Long <[hidden email]> wrote:
> It would be nice to have default column mappings for CompositeUserType's in
> hibernate. Is there an existing ticket or any resistance to having Grails
> call:
>
> public String[] getPropertyNames();
>
> on a user-type mapping that's composite and use a convention of:
>
> basePropertyName_subPropertyName
>
> similary to embedded types? We use alot of Money and Periods and are looking
> at moving to the JSR-310 eventually (using jadira usertypes). This seems
> like it would be a nice-to-have convention.
>
> Right now, without a column mapping, you get something like:
>
> property mapping has wrong number of columns: test.Book.published type:
> org.jadira.usertype.dateandtime.joda.PersistentDateTimeAndZoneWithOffset
>
> Yeah? Nay?
>
> -Aaron



--
Graeme Rocher
Grails Project Lead
SpringSource

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Loading...