Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - How to query a bag with Nhibernate -


i need publications country list doesn't contain country (research on isocode2)

the sql query :

select * pub_head ph not exists (select 1 pub_head_forbidden_country phfc , country c                 phfc.pub_head_id = ph.pub_head_id                  , phfc.country_id = c.country_id                  , c.iso_code2 = 'ca'); 

and model :

<class name="publication" table="pub_head">    <id name="id" column="pub_head_id">    <generator class="native">     <param name="sequence">seq_pub_head</param>    </generator>   </id>    <idbag name="countries" table="pub_head_country" lazy="true">    <collection-id column="pub_head_country_id">     <generator class="native">      <param name="sequence">seq_pub_head_country</param>     </generator>    </collection-id>     <key column ="pub_head_id"  />    <many-to-many class="model.referential.country, model" column="country_id"/>   </idbag> </class>  <class name="country" table="country">   <id name="id" column="country_id">    <generator class="native">    </generator>   </id>   <property name="name">    <column name="name"></column>   </property>   <property name="isocode2">    <column name="iso_code2"></column>   </property>   <property name="isocode3">    <column name="iso_code3"></column>   </property>   </class> 

i began subqueries, didn't success it.

thanks

the sql too

select * pub_head ph ph.pub_head_id not in (   select phfc.pub_head_id   pub_head_forbidden_country phfc     inner join country  c on phfc.country_id = c.country_id   c.iso_code2 = 'ca' ) 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -