[eluser]jedd[/eluser]
[quote author="biber90" date="1279213455"]
I have created a model called "test_model" with a function in it.
[/quote]
More information - what's the filename, what's the model's actual name.
Quote:If I load this model in another models function, the function of the test_model works fine.
Don't do this. It suggests your design is flawed. Consider extending the Model (MY_Model) or shifting common functionality into a library (or even helper - though if you're trying to do DB stuff, a library is preferable).
Quote:But when I want to connect to the database automatically (so I add 'database' to the autoload array), than
I get an error that the function in the test_model could not be find.
The error message you showed isn't the same as 'test_model could not be found'. Did you see other error messages that you didn't post?
Quote:I can not appreciate it. Where is the connection between the database library and models?
The user guide goes through this in some detail - I'd recommend you re-read the sections on libraries and models.
The [url="/wiki/FAQ"]FAQ[/url] also contains an answer to this question (okay - so I just put it in there - but only because I'm getting bored of the number of people who post questions without scanning the forums first for an existing answer. Have a read through my [url="/wiki/How_to_ask_a_good_question/"]guide to asking good questions[/url] when you have a minute.