Tim Moores wrote:
If I were to solve this, I might resort to Prolog instead.
Piet Souris wrote:
1) do you use all the 8 numbers 1...8, or is it allowed to have say 3 8's in the matrix?
Piet Souris wrote:
2) if a = 2; then I assume that the neighboring cells (b, c, d, e) may not conrtain either 1 or 3
Piet Souris wrote:
3) how did you get a total number of possibilities of 1.6M?
Campbell Ritchie wrote:
16777216 = 2²⁴, which suggests to me that the eight boxes don't have to contain distinct numbers, otherwise you would be calculating factorials.. . . . (I calculate total possibilities are 16777216.) . . ..
Piet Souris wrote:
4) we have a dedicated forum for all things puzzles and programming 'programming diversions'. Have a look, I think you will like it.
Campbell Ritchie wrote:
Foiur? Six, surely?Mandar Khire wrote:. . . 2. If 'd' have 1 then its neighboring box are 'a','b','c','e','g','h'. So those four box should not have number 2. etc etc
3.4.2. Outer Join Fetching
If your database supports ANSI, Oracle or Sybase style outer joins, outer join fetching will often
increase performance by limiting the number of round trips to and from the database. This is,
however, at the cost of possibly more work performed by the database itself. Outer join fetching
allows a whole graph of objects connected by many-to-one, one-to-many, many-to-many and oneto-
one associations to be retrieved in a single SQL SELECT.
Outer join fetching can be disabled globally by setting the property hibernate.max_fetch_depth
to 0. A setting of 1 or higher enables outer join fetching for one-to-one and many-to-one
associations that have been mapped with fetch="join".
See Section 21.1, “Fetching strategies” for more information.
Join fetching: Hibernate retrieves the associated instance or collection in the same SELECT,
using an OUTER JOIN.
<set name="permissions" <br /> fetch="join">
<key column="userId"/>
<one-to-many class="Permission"/>
</set >
<many-to-one name="mother" class="Cat" fetch="join"/>
Now, to reply to your question: MySQL (and any SQL) are very different from Hibernate. Hibernate deals with objects and has its own query language. You shouldn't expect a query that works in SQL to work in Hibernate -- in fact it most likely won't. Do a Google search for hibernate query syntax and you will find many websites to assist you.