0

Here's my class:

@Entity (name = "Client")
public abstract class MyClient
{
    private Map<String, String> _properties;
}

Hiberate map my properties object into a class named "MyClient_properties".
How can I modify it so it will be mapped to "Client_properties"?
Thanks

1 Answer 1

2

Interestingly I thought that is supposed to be the default. Pretty sure the default naming feature is supposed to take the @Entity#name value rather than the class name if it is supplied.

Anyway, to explicitly name the collection table you'd use (oddly enough) the JPA @CollectionTable annotation:

@CollectionTable( name="Client_properties" )
private Map<String, String> _properties;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.