Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT a FROM A a LEFT JOIN a.b where ...
- SELECT a FROM A a LEFT JOIN a.b where a.b_id = b.id(+)
- SELECT a FROM where a.b.id > 5
- SELECT a.* FROM A b cross join B b where b.id > 5
- SQL Error: 25156, SQLState: 99999
- ORA-25156: old style outer join (+) cannot be used with ANSI joins
- SELECT alarm FROM Alarm as a LEFT JOIN alarm.madeBy as user where user.name = 'George' and a.source.name = 'UFO'
- FROM Alarms a, Users u cross join Sources s where a.user_id = u.user_id(+) and a.source_id = s.source_id and u.name = 'George' and s.name = 'UFO'
- @Entity
- @Table(name = 'Alarms')
- public class Alarm {
- @Id
- private BigDecimial id;
- @ManyToOne
- @JoinColumn(name = "user_id")
- private User madeBy;
- @ManyToOne
- @JoinColumn(name = "source_id")
- private Source source;
- }
- <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
Add Comment
Please, Sign In to add comment