Hibernate save multiple schema without insert update

Hi all,

I am referencing an entity as foreign key which is a master table from another schema.I have only select, reference rights to the current user.when I try to insert or update my table which have the foreign key is saying insufficient preveleges…I don’t want any action on master table but foreign key referance value must be in my entity is required.is it possible with many to one entity annotations .if so kindly post reply please…tried cascade also…pl explain the right way to do this

If it’s the database that complains about the association, then you can’t do much unless you drop the constraint, which would be a bad move.

but i want it as foreign key

You can use the @JoibTable annotation to specify the catalog/schema where the FK resides. Just add the @JoinTable to the @ManyToOne association and it should work assuming you can reference the FK in some other catalog/schema at the DB level.

Thank you @vlad…will try