NHibernate, отображающийся - непосредственный (или один к нулю)

Попробуй это. используйте другой улов, чтобы получить фатальные ошибки

try{
    class Stuff
    {

    }

    $stuff= new Stuff();
    $stuff["test"]=0;   <<<<<<< this should trigger the below catch 
} catch (Exception $e) {
    $myLogger->Log($e);
}  catch (Error $e) {
    // Handle error
    echo $e->getMessage(); // Call to a member function method() on string
} catch (Throwable $e) {
        // Handle error
        echo $e->getMessage(); // Call to undefined function undefinedFunctionCall()
    }
7
задан Iain Holder 30 December 2008 в 14:25
поделиться

3 ответа

Вы рассмотрели использование элемента Соединения, который был представлен в NHibernate 2.0? Этот элемент позволяет Вам соединять несколько таблиц для формирования одного объекта; те отношения могут также быть дополнительными.

7
ответ дан 6 December 2019 в 10:04
поделиться

Проверьте эту ссылку: http://www.hibernate.org/hib_docs/nhibernate/html/inheritance.html

"Подкласс, к которому присоединяются", отображающийся в особенности, я думаю, что Вы найдете полезным (предположение, что WibbleExtended наследовался Wibble).

1
ответ дан 6 December 2019 в 10:04
поделиться

This question has a broader implication that has been in my mind for ages. I too, was brought up on using FillChar for records. This is nice because we often add new fields to the (data) record and of course FillChar( Rec, SizeOf( Rec), #0 ) takes care of such new fields. If we 'do it properly', we have to iterate through all fields of the record, some of which are enumerated types, some of which may be records themselves and the resulting code is less readable as well be possibly erroneous if we dont add new record fields to it diligently. String fields are common, thus FillChar is a no-no now. A few months ago, I went around and converted all my FillChars on records with string fields to iterated clearing, but I was not happy with the solution and wonder if there is a neat way of doing the 'Fill' on simply types (ordinal / float) and 'Finalize' on variants and strings?

--121 --- 1375940--
import subprocess

p = subprocess.Popen("md5sum gmail.csv", shell=True, stdout=subprocess.PIPE)
resultMD5, filename = p.communicate()[0].split()
print resultMD5
--121 --- 4270034--

Ошибка, которую вы получаете:

Неверный индекс n для этого SqlParameterCollection с Count = n.

происходит из-за двух свойств, сопоставленных с одним и тем же столбцом . Используйте insert = false и update=false in one of the two.

reference http://groups.google.com/group/nhusers/browse_thread/thread/84830b1257efd219

11
ответ дан 6 December 2019 в 10:04
поделиться
Другие вопросы по тегам:

Похожие вопросы: