Discussion:
CompositeUserType: default property -> column mapping?
Aaron Long
2014-05-08 17:35:29 UTC
Permalink
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
2014-05-08 21:18:20 UTC
Permalink
Perhaps an example of what you want to achieve attached to a JIRA
feature request would help
Post by Aaron Long
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
public String[] getPropertyNames();
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.
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
Aaron Long
2014-05-08 21:53:33 UTC
Permalink
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.
Post by Graeme Rocher
Perhaps an example of what you want to achieve attached to a JIRA
feature request would help
Post by Aaron Long
It would be nice to have default column mappings for CompositeUserType's
in
Post by Aaron Long
hibernate. Is there an existing ticket or any resistance to having Grails
public String[] getPropertyNames();
basePropertyName_subPropertyName
similary to embedded types? We use alot of Money and Periods and are
looking
Post by Aaron Long
at moving to the JSR-310 eventually (using jadira usertypes). This seems
like it would be a nice-to-have convention.
org.jadira.usertype.dateandtime.joda.PersistentDateTimeAndZoneWithOffset
Yeah? Nay?
-Aaron
--
Graeme Rocher
Grails Project Lead
SpringSource
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Loading...