[hibernate-issues] [Hibernate-JIRA] Updated: (ANN-28) @Any
Alexander Portnov (JIRA)
noreply at atlassian.com
Sun Oct 22 19:30:05 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-28?page=all ]
Alexander Portnov updated ANN-28:
---------------------------------
Attachment: annotations-any-patch.txt
Implementation of @Any and @ManyToAny annotations.
Following are syntax examples:
@Any(idType="integer", metaType="string",
metaValues={
@MetaValue(value="S",targetEntity=StringProperty.class),
@MetaValue(value="I",targetEntity=IntegerProperty.class)},
columns = {
@Column(name="property_type"),
@Column(name="property_id")},
cascade= CascadeType.ALL)
public Property getSomeProperty() {
return someProperty;
}
@ManyToAny(idType="integer", metaType="string",
metaValues={
@MetaValue(value="S", targetEntity=StringProperty.class),
@MetaValue(value="I", targetEntity=IntegerProperty.class)},
columns = {
@Column(name="property_type"),
@Column(name="property_id")})
@Cascade({org.hibernate.annotations.CascadeType.ALL})
@JoinTable(name="obj_properties", joinColumns = {@JoinColumn(name="obj_id")})
public List<Property> getGeneralProperties() {
return generalProperties;
}
@ManyToAny(idType="integer", metaType="string",
metaValues={
@MetaValue(value="S", targetEntity=StringProperty.class),
@MetaValue(value="I", targetEntity=IntegerProperty.class)},
columns = {
@Column(name="property_type"),
@Column(name="property_id")})
@Cascade({org.hibernate.annotations.CascadeType.ALL})
@JoinTable(name="map_properties", joinColumns = {@JoinColumn(name="map_id")})
@MapKey(columns = {@Column(name="map_key")})
public Map<String, Property> getProperties() {
return properties;
}
> @Any
> ----
>
> Key: ANN-28
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-28
> Project: Hibernate Annotations
> Type: Improvement
> Components: binder
> Versions: 3.1beta3
> Reporter: Emmanuel Bernard
> Priority: Trivial
> Attachments: annotations-any-patch.txt
>
>
> @AnyValue(value="", class="") //or MetaValue?
> @Any(idType="", metaType="", metaValues={@MetaValue()}, columns={@Column()})
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list