Skip to content

Getting Error on Expand Function . #238

Closed
@suraj-mane-zellis

Description

@suraj-mane-zellis

I am using 2.0.0 release of odata jpa with spring boot 3.1.3 version . I have added OneToOne relationship into Location entity .

When I am use Expand , I am getting error

URL : http://host url/odata/Locations?$expand=Address

Response : {
"error": {
"code": null,
"message": "Could not determine recommended JdbcType for com.odata.entity.Address"
}
}

Sample Code :

  @Entity
  @Cacheable(false)
  @Table(name = "Location")
 public class Location {


@Id
@Column(name = "LocationId", nullable = false)
private Short locationId;

@Column(name = "AddressId")
private Integer addressId;

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "AddressId",referencedColumnName = "AddressId"
        insertable = false, updatable = false)
    private Address address;

//getters and setters

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions