 	,birthdaymonth=11
 	,birthdayyear=1975
 	,isactive=1
-);
-
-loc.user = model("user").create(
+)>
+
+<cfset loc.user = model("user").create(
 	username='chrisp'
 	,password='chrisp123'
 	,firstname='Chris'

	,birthdaymonth=9
	,birthdayyear=1973
	,isactive=1
);

loc.user = model("user").create(
	username='raulr'
	,password='raulr23'
	,firstname='Raul'

	,birthdaymonth=11
	,birthdayyear=1973
	,isactive=1
)>

<cfset loc.per = model("author").create(firstName="Per", lastName="Djurner")>
<cfset loc.per.createProfile(dateOfBirth="20/02/1975", bio="ColdFusion Developer")>
<cfset loc.per.createPost(title="Title for first test post", body="Text for first test post", views=5)>
<cfset loc.per.createPost(title="Title for second test post", body="Text for second test post", views=5, averageRating="3.6")>
<cfset loc.per.createPost(title="Title for third test post", body="Text for third test post", averageRating="3.2")>
<cfset loc.tony = model("author").create(firstName="Tony", lastName="Petruzzi")>
<cfset loc.tony.createPost(title="Title for fourth test post", body="Text for fourth test post", views=3, averageRating="3.6")>
<cfset loc.tony.createPost(title="Title for fifth test post", body="Text for fifth test post", views=2, averageRating="3.6")>
<cfset loc.chris = model("author").create(firstName="Chris", lastName="Peters")>
<cfset loc.peter = model("author").create(firstName="Peter", lastName="Amiri")>
<cfset loc.james = model("author").create(firstName="James", lastName="Gibson")>
<cfset loc.raul = model("author").create(firstName="Raul", lastName="Riera")>
<cfset loc.andy = model("author").create(firstName="Andy", lastName="Bellenie")>

<cfset loc.users = model("user").findAll(order="id")>

<cfloop query="loc.users">
	<cfloop from="1" to="5" index="loc.i">
		<cfset loc.gallery = model("gallery").create(
			userid="#loc.users.id#"
			,title="#loc.users.firstname# Test Galllery #loc.i#"
			,description="test gallery #loc.i# for #loc.users.firstname#"
		)>

		<cfloop from="1" to="10" index="loc.i2">
			<cfset loc.photo = model("photo").create(
				galleryid="#loc.gallery.id#"
				,filename="Gallery #loc.gallery.id# Photo Test #loc.i2#"
				,description1="test photo #loc.i2# for gallery #loc.gallery.id#"
			)>
		</cfloop>
	</cfloop>
</cfloop>

<cfset model("user2").create(username="Chris", password="x", firstName="x", lastName="x")>
<cfset model("user2").create(username="Tim", password="x", firstName="x", lastName="x")>
<cfset model("user2").create(username="Tom", password="x", firstName="x", lastName="x")>

<!--- create a profile with an author --->
<cfset model("profile").create(dateOfBirth="1/1/1970", bio="Unknown Author")>

<cfset loc.posts = model("post").findAll(order="id")>

<cfloop query="loc.posts">
	<cfloop from="1" to="3" index="loc.i">
		<cfset loc.comment = model("comment").create(
			postid=loc.posts.id
			,body="This is comment #loc.i#"
			,name="some commenter #loc.i#"
			, url="http://#loc.i#.somecommenter.com"
			, email="#loc.i#@#loc.i#.com"
		)>
	</cfloop>
</cfloop>

<!--- cities and shops --->
<cfloop from="1" to="5" index="loc.i">
	<cfset model("city").create(
		id="3"
		,citycode="#loc.i#"
		,name="county #loc.i#"
	)>

	<cfset model("shop").create(
		shopid="shop#loc.i#"
		,citycode="#loc.i#"
		,name="shop #loc.i#"
	)>
</cfloop>

<cfset model("shop").create(shopid=" shop6", citycode=0, name="x")>

<!--- tags --->
<cfset loc.releases = model("tag").create(name="releases",description="testdesc")>
<cfset model("tag").create(name="minor",description="a minor release", parentid=3)>
<cfset model("tag").create(name="major",description="a major release")>
<cfset model("tag").create(name="point",description="a point release", parentid=2)>

<cfset loc.fruit = model("tag").create(name="fruit",description="something to eat")>
<cfset model("tag").create(name="apple",description="ummmmmm good", parentid=loc.fruit.id)>
<cfset model("tag").create(name="pear",description="rhymes with Per", parentid=loc.fruit.id)>
<cfset model("tag").create(name="banana",description="peal it", parentid=loc.fruit.id)>

<!--- classifications --->
<cfset model("classification").create(postid=1,tagid=7)>

<!--- collisiontests --->
<cfset model("collisiontest").create(
	method="test"
)>

<!--- collisiontests --->
<cfloop from="1" to="5" index="i">
	<cfloop from="1" to="5" index="a">
		<cfset model("CombiKey").create(
			id1="#i#",
			id2="#a#",
			userId="#a#"
		)>
	</cfloop>
</cfloop>

<!--- sqltype --->
<cfset model("sqltype").create(
	stringVariableType="tony"
	,textType="blah blah blah blah"
)>

<!--- assign posts for multiple join test --->
<cfset loc.andy.update(favouritePostId=1, leastFavouritePostId=2)>
