@Retention(value=RUNTIME) @Target(value=TYPE) public @interface UnrelatedTo
Why would you need this annotation? If you use caching, it will invalidate caches of related models
in cases where a destructive operation is executed (DELETE, INSERT, UPDATE).
If you do not want your table to be flushed again and again, you can disconnect
the relationship by using this annotation. You can still manage the relationship manually using
the foreign key in a child table, but methods like parent.add(child)
or child.parent(Parent.class)
and others will not work ... unless you override them.
Copyright © 2019 JavaLite. All rights reserved.