Set Primary key and Foreign key on a single column in hibernate mapping having type String

Of course, it is possible.

I need to have the Primary Key and the Foreign key on the same column (which is RequestID) .

First, you need to use @MapsId as explained in this article.

Also, the requirement is that this key must be a VARCHAR and generated by the application and not auto-generated by DB.

Just remove the @GeneratedValue fro the @Id in the Request class:

@Id
@Column(name = "RequestID")
private String id;

And in the SubRequest entity you will have:

@Id
@Column(name = "RequestID")
private String id;

@OneToOne(fetch = FetchType.LAZY)
@MapsId
private Reqeust request;