Changeset 8220 for mauRepo


Ignore:
Timestamp:
10/04/12 22:03:55 (8 years ago)
Author:
mnagni
Message:

Incomplete - # 22428: CEDA Project - observationCollection
 http://team.ceda.ac.uk/trac/ceda/ticket/22428

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/sqlTables.py

    r8197 r8220  
    1 from sqlalchemy import Table, Column, ForeignKey, Sequence 
     1from sqlalchemy import Table, Column, ForeignKey, Sequence, event 
    22from sqlalchemy.orm import relationship, mapper 
    33from sqlalchemy.orm.util import class_mapper 
     
    408408from ea_model.iso_19123_2005_coverages.coverages.quadrilateral_grid.cv_referenceablegrid import  CV_ReferenceableGrid    
    409409from ea_model.iso_19109_2005_application_schema.general_feature_model.gf_associationrole import  GF_AssociationRole 
     410import inspect 
    410411 
    411412def next_id(connection, seq_name): 
     
    415416 
    416417 
    417 def doTables(metadata): 
    418          
    419  
    420  
    421  
    422  
    423  
    424  
    425  
     418def my_after_attach(session, instance):  
     419        for item in inspect.getmembers(instance): 
     420                if item[0] == 'synchronize': 
     421                        instance.synchronize() 
     422 
     423def attachEvents(session): 
     424        event.listen(session, 'after_attach', my_after_attach) 
     425 
     426def doTables(metadata):  
    426427    md_geometricobjects_table = Table('md_geometricobjects', metadata, 
    427428    Column('id', Integer, Sequence('md_geometricobjects_id_seq'), primary_key=True), 
     
    86388639 
    86398640 
     8641 
Note: See TracChangeset for help on using the changeset viewer.