When you create a custom data type in Oracle, it creates a default constructor for you. But you don’t have access to modify this constructor. This can be a problem if you need some error checking or business logic. The documentation only mentions that it is possible to override the default constructor. However, every time I tried to do it I would get an error message complaining that two functions signatures matched this call. And because it didn’t know which function to use, it wouldn’t let me use either.
After reading and rereading the documentation, googling, and asking questions on help forums, I finally discovered the solution by accident. What they don’t tell you is that in order to override the default constructor, you not only have to match the position and type of attributes but also their NAMES. Once I changed the names to match that of the actual attributes, it worked like a charm.