IntelliJ generating bad get/set method names? setShippingDestinationByShippingDestinationId

IntelliJ is by default generating what I consider to be very poor getter/setter method names.  I'm trying to figure out if this is because of something I'm doing, or if it's just IntelliJ.  For the foriegn keyed database column "shipping_destination_id" FK to table "Shipping_Destination" it generates this:

    private ShippingDestination shippingDestinationByShippingDestinationId;

    @ManyToOne
    @javax.persistence.JoinColumn(name = "shipping_destination", referencedColumnName = "id", nullable = false)
    public ShippingDestination getShippingDestinationByShippingDestinationId() {
        return shippingDestinationByShippingDestinationId;
    }

    public void setShippingDestinationByShippingDestinationId(ShippingDestination shippingDestinationByShippingDestinationId) {
        this.shippingDestinationByShippingDestinationId = shippingDestinationByShippingDestinationId;
    }



Is there a setting I'm triggering here, or is this just how IntelliJ does it?
1 comment

The name of the persistent relationship field/property is presented in Database Schema Import dialog.
The defaults are not good and I must admit that the generator itself is a pretty old code.
There're lots of feature/improvement requests in our tracker that will be handled in pack when this subsystem get proper attention.

You may add this problem to the pack as well.

0

Please sign in to leave a comment.