Best code examples for Hibernate ORM ManyToOne class (org.hibernate.mapping.ManyToOne)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ManyToOne class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM ManyToOne examples from Open Source projects
This code example shows how to use the following methods:
 
    public void testRequiresShardLock() { 
        final Mappings mappingsMock = Mockito.mock(Mappings.class);
        final Property property = new Property();
        assertFalse(shardedConfiguration.doesNotSupportTopLevelSave(property));
        final ManyToOne mto = new ManyToOne(mappingsMock, new Table());
        property.setValue(mto);
        assertFalse(shardedConfiguration.doesNotSupportTopLevelSave(property));
        final OneToOne oto = new OneToOne(mappingsMock, new Table(), new RootClass());
        property.setValue(oto);
        assertTrue(shardedConfiguration.doesNotSupportTopLevelSave(property));
    } 
 
    private class MyShardStrategyFactory extends ShardStrategyFactoryDefaultMock { 
        @Override 
        public ShardStrategy newShardStrategy(List<ShardId> shardIds) {
            return null; 
        } 
    } 
 
Full Snippet Info
4
CodeRank