You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, SQL is loaded from files on the classpath, depending on the method called and which DAO subclass is used.
com/app/ContactDao/insert.sql
com/app/ContactDao/getById.sql
com/app/ContactDao/list.sql
com/app/ContactDao/update.sql
com/app/ContactDao/delete.sql
com/app/AccountDao/insert.sql
com/app/AccountDao/getById.sql
com/app/AccountDao/list.sql
com/app/AccountDao/update.sql
com/app/AccountDao/delete.sql
Note that @UseClasspathSqlLocator is repeated on every method instead of once on the CrudDao type. This is because right now, we only look for annotations on the SQL object type itself, and not supertypes (see #438). If a DAO subtype overrides a method from a supertype, we only look at the annotations present in the subtype.
In the future we may change this to look for annotations in the supertype, in which case we can update this example.
The text was updated successfully, but these errors were encountered:
In this example, SQL is loaded from files on the classpath, depending on the method called and which DAO subclass is used.
Note that
@UseClasspathSqlLocator
is repeated on every method instead of once on theCrudDao
type. This is because right now, we only look for annotations on the SQL object type itself, and not supertypes (see #438). If a DAO subtype overrides a method from a supertype, we only look at the annotations present in the subtype.In the future we may change this to look for annotations in the supertype, in which case we can update this example.
The text was updated successfully, but these errors were encountered: