How can I use @Unique annotation for an AO field?

smhf97 March 28, 2021

Hi everyone! Sorry if this is a noob question. I googled it but could not find anything.

When I use the Unique annotation in my AO Entity class it says "cannot find symbol: class Unique"
I can't find the Unique class so I don't know how to import it.

Thanks!   

1 answer

1 accepted

0 votes
Answer accepted
Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 1, 2021

Hi @smhf97 

Try this:

import net.java.ao.schema.Unique;
smhf97 April 2, 2021

Hi @Nir Haimov 
Yeah that was it, thank you!

Suggest an answer

Log in or Sign up to answer