Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThomas, I was hoping to be able to just call SaveOrUpdate but since I'm not able to check what type of exception was thrown, I have no way of notifying the user what went wrong. That is why I wanted to throw my own exception (UsernameExistsException). Or is there a way to get more specific NHibernate exceptions that I am not aware of? Regarding SQLite; yes, we use SQLite on our local dev mashines and for our integration tests. We currently have no production environment set up. I will keep it in mind but it seems unlikely that SQLite couldn't handle this simple scenario.
      singulars
    2. CODo you generate your SQLite instance via hbm2ddl from your NH mappings? Then that's the problem: SQLite does not support 'ALTER TABLE' statements, AFAIK they are silently ignored. You just can't use SQLite for integration tests, if your planning to target another DBMS in production - it's not a full replacement. It may be fast and easy, but it can give wrong results. You should take you half an hour to test this code against a full DBMS - I'm quite sure the test will pass...
      singulars
    3. CO@Thomas Weller: I'm afraid that is not the case. We drop the tables in the db and use schema export to add the new tables. Regarding SQLite for integration tests, your statement is the exact opposite to what I've heard from a lot of people. Why can't you use it for integration tests? Thanks for the input!
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload