[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2048) Incomplete MappingException at org.hibernate.mapping.SimpleValue
Diego Pires Plentz (JIRA)
noreply at atlassian.com
Sun Apr 15 22:15:04 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diego Pires Plentz updated HHH-2048:
------------------------------------
Attachment: SimpleValue.java.patch
> Incomplete MappingException at org.hibernate.mapping.SimpleValue
> ----------------------------------------------------------------
>
> Key: HHH-2048
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2048
> Project: Hibernate3
> Issue Type: Improvement
> Affects Versions: 3.2.0.cr4
> Reporter: Diego Pires Plentz
> Attachments: SimpleValue.java.patch
>
>
> When a mapped class has a wrong type, an exception is throwed, but it doesnt say nothing about what class/table is mapped wrongly.
> public Type getType() throws MappingException {
> if (typeName==null) {
> throw new MappingException("No type name");
> }
> Type result = TypeFactory.heuristicType(typeName, typeParameters);
> if (result==null) {
> String msg = "Could not determine type for: " + typeName;
> if(columns!=null && columns.size()>0) {
> msg += ", for columns: " + columns;
> }
> throw new MappingException(msg);
> }
> return result;
> }
> Can become something like this...
> public Type getType() throws MappingException {
> if (typeName==null) {
> throw new MappingException("No type name");
> }
> Type result = TypeFactory.heuristicType(typeName, typeParameters);
> if (result==null) {
> String msg = "Could not determine type for: " + typeName;
> if(table != null){
> msg += ", at table: " + table.getName();
> }
> if(columns!=null && columns.size()>0) {
> msg += ", for columns: " + columns;
> }
> throw new MappingException(msg);
> }
> return result;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list