Menu

#16 Field-type not handled by DDL

open
nobody
DDL (7)
5
2003-05-23
2003-05-23
No

From niko_schmuck@users.sourceforge.net
Basically I need a simple String to URL mapping:

public class Channel ...

/** @get-method getLocationAsString
* @field-type String
* @sql-size 255 */
private URL location;

public URL getLocation() {
return location;
}

public String getLocationAsString(){
return getLocation().toString();
}

public void setLocation(URL location) {
this.location = location;
}

public void setLocation(String location) {
try {
setLocation(new URL(location));
} catch (MalformedURLException e) {
try {
logger.info("Resetting invalid location <" +
location + ">: " + e);
setLocation(new URL("http://example.org"));
} catch (MalformedURLException x) {
// unreachable
}
}
}
...
}

... but I still get the following result:
[javadoc] 2: Can't mapp the relation between
CHANNEL and
java.net.URL

Discussion

MongoDB Logo MongoDB