[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-167) Prefix for embedded many-to-one indexing is not applied correctly
Christian Bauer (JIRA)
noreply at atlassian.com
Wed Mar 12 19:46:32 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29779 ]
Christian Bauer commented on HSEARCH-167:
-----------------------------------------
It doesn't work WITHOUT @Indexed and @DocumentId on the User class...
> Prefix for embedded many-to-one indexing is not applied correctly
> -----------------------------------------------------------------
>
> Key: HSEARCH-167
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-167
> Project: Hibernate Search
> Issue Type: Bug
> Components: mapping
> Reporter: Christian Bauer
>
> This is with the JAR from trunk I received from Emmanuel a few weeks ago:
> @ManyToOne(fetch = FetchType.LAZY)
> @org.hibernate.search.annotations.IndexedEmbedded(prefix = "createdBy_")
> protected User createdBy;
> @ManyToOne(fetch = FetchType.LAZY)
> @org.hibernate.search.annotations.IndexedEmbedded(prefix = "lastModifiedBy_")
> protected User lastModifiedBy;
> And on User class (by the way, it doesn't work with @Indexed on that class, contrary to documentation):
> @org.hibernate.search.annotations.Indexed
> public class User implements Serializable {
> @org.hibernate.search.annotations.DocumentId(name = "userId")
> private Long id = null;
> @org.hibernate.search.annotations.Field(
> index = org.hibernate.search.annotations.Index.UN_TOKENIZED,
> store = org.hibernate.search.annotations.Store.YES
> )
> private String username; // Unique and immutable
> }
> In the index (checked with Luke) I get:
> <createdBy_userId>
> <createdBy_username>
> <createdBy_usernameusername>
> instead of the desired
> <createdBy_userId>
> <createdBy_username>
> <lastModifiedBy_username>
--
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