ahmetb / orman

lightweight and minimalist ORM for Java/Android. works with SQLite & MySQL. (not actively maintained)
Other
249 stars 47 forks source link

Delay database connections in DBMS adapters #8

Closed ahmetb closed 13 years ago

ahmetb commented 13 years ago

We should delay establishing connections to DBMSes (if necessary) until MappingSession.start() since it is a blocking task and should not run upon initialization of adapter (which is an org.orman.datasource.Database implementation).

ahmetb commented 13 years ago

DBMS QueryExecutionContainerImpls using OnDemandConnection class are subject to throw unhandled NullPointerException when their close() method is called without any database operation that requires database to be initialized lazily.

Saw this in my dream this morning, not tested but it seems so. Can you fix this? Thanks.

0ffffffffh commented 13 years ago

ok. i will take care of it soon. thanks for feedback.

0ffffffffh commented 13 years ago

berker, thanks for that bug fix.