HHH-5233 add test on @FetchProfile and multiple @FetchOverride

Clean some more

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19535 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Emmanuel Bernard 2010-05-18 07:05:32 +00:00
parent 3d988c6a6d
commit 58fa9e2e0f
3 changed files with 7 additions and 6 deletions

View File

@ -49,7 +49,8 @@ import org.hibernate.annotations.FetchProfiles;
@FetchProfile(name = "customer-with-orders-and-country",
fetchOverrides = {
@FetchProfile.FetchOverride(entity = Customer.class, association = "orders", mode = FetchMode.JOIN),
@FetchProfile.FetchOverride(entity = Customer.class, association = "lastOrder", mode = FetchMode.JOIN)
@FetchProfile.FetchOverride(entity = Customer.class, association = "lastOrder", mode = FetchMode.JOIN),
@FetchProfile.FetchOverride(entity = Order.class, association = "country", mode = FetchMode.JOIN)
})
})
public class Customer {

View File

@ -13,7 +13,7 @@ import org.hibernate.test.annotations.TestCase;
*/
public class MoreFetchProfileTest extends TestCase{
@FailureExpected( jiraKey = "HHH-5233")
//@FailureExpected( jiraKey = "HHH-5233")
public void testFetchWithTwoOverrides() throws Exception {
Session s = openSession( );
s.enableFetchProfile( "customer-with-orders-and-country" );
@ -47,7 +47,7 @@ public class MoreFetchProfileTest extends TestCase{
assertTrue( Hibernate.isInitialized( c.getLastOrder() ) );
assertTrue( Hibernate.isInitialized( c.getOrders() ) );
for(Order so : c.getOrders() ) {
//assertTrue( Hibernate.isInitialized( so.getCountry() ) );
assertTrue( Hibernate.isInitialized( so.getCountry() ) );
}
final Order order = c.getOrders().iterator().next();
c.getOrders().remove( order );

View File

@ -40,15 +40,15 @@
<configuration>
<sourceDocumentName>HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.xml</sourceDocumentName>
<masterTranslation>en-US</masterTranslation>
<translations>
<!-- translations>
<translation>de-DE</translation>
<translation>es-ES</translation>
<translation>fr-FR</translation>
<translation>ja-JP</translation>
<!-- <translation>ko-KR</translation> -->
<!- - <translation>ko-KR</translation> - ->
<translation>pt-BR</translation>
<translation>zh-CN</translation>
</translations>
</translations -->
<imageResource>
<directory>${basedir}/src/main/docbook/en-US</directory>
<excludes>