Andrey Markhel
unread,May 2, 2012, 1:07:29 PM5/2/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ActiveJDBC Group
Igor, I'd look deep inside AJ last week and I have some notes and
thoughts.
First, about little issue with Ubuntu and Linux, when I run test
Defect117Test.java - I catch nice Exception -
"activejdbc.Member table not found".
After some research I figured that to solve such kind of problems,
people should use setting "lower_case_table_names=1". Maybe, someone
will encounter same problem and my solution will help.
Second, I have one proposal for change behaviour of purging
distributed cache. For example, now cache purged automatically when
any INSERT|DELETE|UPDATE occur. My suggeston is check count of
affected records. If 0 - there are no need to purge cache, how do you
think?
Third, I have one idea to how improve userability in some queries. To
be more precise, I propose to introduce possibility of next
construction - Member.find(" organiztion='Amazon' and o.important =
true").join("o", Order.class)
This query - for find All members, that have name=Peter and that
member should have at least one important order(order with filed
important = true"). To do this, I propose introduce method join(String
alias, Model clazz), That alias can be used inside query to access
dependent entities(instead writing tedious left outer join). What do
you think about it?
Actually, I implement that in local machine for one-to-many and
polymorphic associations, but steel have some minor issues with
dialects. I didn't implement for many-to-many because it is
complicated and makes little sense.
Forth, I discover some issues with associations - for example, there
are troubles with self-referenced tables, with association of same
type on one entity.. etc. I figured out one way to improve AJ
associations and now working on it, I'll post more about it in next
topic.
Fifth, I discover some dead code, minor issues in code, and some
considerations for improvement some parts of code. I'd comment that
areas and going to commit in some branch. I'm hope that you well think
of the criticism :)